-
Eric Wong authored
Avoid unnecessary memset to zero, snprintf always puts a trailing '\0'. We also have no need to subtract one from the buffer we're snprintf-ing it to. We also check the return value of snprintf to ensure it's not too long. I have a feeling we might as well avoid snprintf altogether so we don't have to worry about buffer sizing/stack overflow and just do a bunch of write(2)s, letting Nagle sort it out... Also, centralize some of the exit error handling in with goto. This makes the code a bit more consistent and maintainable as well as reducing code and binary size. git-svn-id: https://svn.musicpd.org/mpd/trunk@5395 09075e82-0dd4-0310-85a5-a0d7c8717e4f
772dc6bc
Name |
Last commit
|
Last update |
---|---|---|
doc | ||
m4 | ||
scripts | ||
src | ||
AUTHORS | ||
COPYING | ||
ChangeLog | ||
INSTALL | ||
Makefile.am | ||
README | ||
TODO | ||
UPGRADING | ||
autogen.sh | ||
configure.ac |