diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2011-09-19 13:17:29 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2011-11-09 20:10:03 +0100 |
commit | 98a01f84ca12ff123f55dad4678f5191caf6d331 (patch) | |
tree | 8f7914dfabb9a51775394b017cb30fc87d47655d /src/libwaitress | |
parent | b6f92f17cbc330e8159cc9e413481753dc2a6d3b (diff) | |
download | pianobar-98a01f84ca12ff123f55dad4678f5191caf6d331.tar.gz pianobar-98a01f84ca12ff123f55dad4678f5191caf6d331.tar.bz2 pianobar-98a01f84ca12ff123f55dad4678f5191caf6d331.zip |
waitress: avoid expensive/unnecessary memset
Diffstat (limited to 'src/libwaitress')
-rw-r--r-- | src/libwaitress/waitress.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libwaitress/waitress.c b/src/libwaitress/waitress.c index 9135ce0..fb082ba 100644 --- a/src/libwaitress/waitress.c +++ b/src/libwaitress/waitress.c @@ -682,7 +682,7 @@ WaitressReturn_t WaitressFetchCall (WaitressHandle_t *waith) { FINISH (WAITRESS_RET_CONNECTION_CLOSED); } bufFilled += recvSize; - memset (buf+bufFilled, 0, WAITRESS_BUFFER_SIZE - bufFilled); + buf[bufFilled] = '\0'; thisLine = buf; /* split */ |