Re: [PATCH 4/7] revert: Allow mixed pick and revert instructions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ramkumar Ramachandra wrote:

> int len = strchrnul(p, '\n') - p;
> if (len > 255 || len - strchrnul(p, '\n') + p != 0)
>     len = 255;

Yuck.  Why not just use a size_t?

> Shouldn't it be part of error() atleast in the long term?

The default implementation of error() is (practically speaking) a thin
wrapper around fprintf.  What are the new semantics you are proposing
--- truncating %s arguments to one short line?  I don't think that
would be a good idea, since for example, some current callers might be
passing "\n" explicitly as a %s argument.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]