coverity 83658 test server check fstat return

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2014-11-30 13:04:46 +08:00
parent 24109f40ae
commit d7b0a72953

View file

@ -212,7 +212,8 @@ static int callback_http(struct libwebsocket_context *context,
if (pss->fd < 0)
return -1;
fstat(pss->fd, &stat_buf);
if (fstat(pss->fd, &stat_buf) < 0)
return -1;
/*
* we will send a big jpeg file, but it could be