DragonFly BSD
DragonFly submit List (threaded) for 2004-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Bad function hunt


From: "Andre Nathan" <andre@xxxxxxxxxxxxxxx>
Date: Sun, 5 Sep 2004 20:36:40 -0300 (BRT)

Andre Nathan said:
> All the patches have been redone and don't touch the string-to-number
> conversion functions anymore, as requested by Matt on another thread.

On these patches, I have substituted every call to strcpy() by calls to
strlcpy(), regardless of the fact that in some situations the source
string is a constant, as in 'strcpy(foo, "blah");'.

Douwe Kiela has pointed to me in private that he would prefer that copies
of constant strings using strcpy() to be left untouched, to avoid bloat. I
used strlcpy() everywhere for consistency, so that a single string copy
function can be used everywhere.

Joerg told me on IRC that I could use strlcpy(), but still it's probably a
good thing to discuss it on the lists, since it can avoid a lot of
repeated work later.

I already have an alternative patchset, so just tell me which one do you
people prefer :)

Regards,
Andre



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