coverity 83662 test server check lseek return

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2014-11-30 12:57:57 +08:00
parent 8ab2b5af8b
commit b17598bea2

View file

@ -394,7 +394,8 @@ static int callback_http(struct libwebsocket_context *context,
*/
if (m != n)
/* partial write, adjust */
lseek(pss->fd, m - n, SEEK_CUR);
if (lseek(pss->fd, m - n, SEEK_CUR) < 0)
goto bail;
if (m) /* while still active, extend timeout */
libwebsocket_set_timeout(wsi,