summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2013-06-05 17:59:54 +0000
committerXavier Roche <xroche@users.noreply.github.com>2013-06-05 17:59:54 +0000
commit6fd01e85701c77d339041a68cff09ffb2b4348ba (patch)
tree4b71104120f129ca72d4701bdf298d75f9bffddd
parent213784d4ad759a9e9abcd3d0a581acb265149009 (diff)
Fixed warning.
-rw-r--r--src/htslib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/htslib.c b/src/htslib.c
index dbd6ddb..04f4360 100644
--- a/src/htslib.c
+++ b/src/htslib.c
@@ -887,6 +887,7 @@ int http_sendhead(httrackp * opt, t_cookie * cookie, int mode, char *xsend,
linput(fp, line, 1000);
if (sscanf(line, "%s %s %s", method, url, protocol) == 3) {
+ int ret;
// selon que l'on a ou pas un proxy
if (retour->req.proxy.active)
sprintf(buff, "%s http://%s%s %s\r\n", method, adr, url,
@@ -894,7 +895,8 @@ int http_sendhead(httrackp * opt, t_cookie * cookie, int mode, char *xsend,
else
sprintf(buff, "%s %s %s\r\n", method, url, protocol);
// lire le reste en brut
- if (fread(buff + strlen(buff), 8000 - strlen(buff), 1, fp) < 0) {
+ ret = fread(buff + strlen(buff), 8000 - strlen(buff), 1, fp);
+ if (ret < 0) {
return -1;
}
}