• Eric Wong's avatar
    inputStream_http: cleanup GET request code (finishHTTPInit) · 772dc6bc
    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 Loading commit data...
m4 Loading commit data...
scripts Loading commit data...
src Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
Makefile.am Loading commit data...
README Loading commit data...
TODO Loading commit data...
UPGRADING Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...