DragonFly submit List (threaded) for 2004-03
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: style(9) sweep on config(8)
Chris Pressey wrote:
o Use memset(ptr, 0, size) instead of bzero(ptr, size)
Is there a reason why uses of bzero() should be changed to memset()?
I've always found memset usage more error-prone; every so often, I
find myself setting a random value to zero bytes, i.e.,
memset(ptr, size, 0), which the compiler doesn't pick up.
I'm not sure about the size/speed tradeoffs in inlined versions of
memset() vs. bzero() either; then again I've never seen either function
show up in a runtime profile, so this doesn't concern me.
Dave
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]