Re: Use more strbufs series [on top of next]

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

 



On Sun, Sep 09, 2007 at 12:04:30AM +0000, Pierre Habouzit wrote:
>   Here is a series of patches on top of next, which use strbufs in even
> more places. Most notably, it uses it in the commit pretty printer (and
> commit message formatter), and it supersedes definitely read_fd
> (previously in sha1_file.c).

  A side note that could help the patch readers: in some places I've
made hunks that basically rename variables called space or size into
len. The reason is that (in my coding standards) length is the length of
the object we are referring to, whereas space/size/... is the amount of
memory we have allocated for it. For a string, the latter is strictly
greater than the former because of the ending NUL of course.

  The rename is because my brain is used to this way of thinking and
that it helps knowing if the off-by-some (off-by-one for a string) are
included in the length-related number you work with or not. So please
don't discard those :)
-- 
·O·  Pierre Habouzit
··O                                                madcoder@xxxxxxxxxx
OOO                                                http://www.madism.org

Attachment: pgpiZA004x1rI.pgp
Description: PGP signature


[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]

  Powered by Linux