Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/dev/videomode
In article <20110410161417.GE4381%nef.pbox.org@localhost>,
Alistair Crooks <agc%pkgsrc.org@localhost> wrote:
>hi christos,
>
>On Sat, Apr 09, 2011 at 04:53:39PM -0400, Christos Zoulas wrote:
>> - use struct copy instead of memcpy
>
>i haven't looked into this specific instance, but won't gcc (at least)
>produce the same code for memcpy as struct copy, and the memcpy call
>has the (admittedly arguable) distinction of being more readable.
It is more readable, exactly.
>> - snprintf("%s") -> strlcpy
>
>i use snprintf("%s") since it's more portable, and avoids having to
>indirect through autoconf HAVE_STRLCPY goo just to invoke
>snprintf("%s") in a stub re-implementation of strlcpy(3). feel the
>glibc luurrrrrrve.
This is a kernel device driver, and the kernel has strlcpy(3) and does
not use autoconf :-)
christos
Home |
Main Index |
Thread Index |
Old Index