mirror of
https://github.com/curl/curl.git
synced 2026-05-30 20:38:23 +03:00
write: add return code checks when used
These were just warnings in test code but it still makes it nicer to not generate them.
This commit is contained in:
parent
ee015947d4
commit
950fb3efcc
2 changed files with 6 additions and 3 deletions
|
|
@ -84,9 +84,11 @@ int test(char *URL)
|
|||
sleep(1); /* avoid ctl-10 dump */
|
||||
#endif
|
||||
|
||||
if(iolen)
|
||||
if(iolen) {
|
||||
/* send received stuff to stdout */
|
||||
write(STDOUT_FILENO, buf, iolen);
|
||||
if(!write(STDOUT_FILENO, buf, iolen))
|
||||
break;
|
||||
}
|
||||
total += iolen;
|
||||
|
||||
} while(((res == CURLE_OK) || (res == CURLE_AGAIN)) && (total < 129));
|
||||
|
|
|
|||
|
|
@ -605,7 +605,8 @@ static ssize_t write_behind(struct testcase *test, int convert)
|
|||
}
|
||||
/* formerly
|
||||
putc(c, file); */
|
||||
write(test->ofile, &c, 1);
|
||||
if(1 != write(test->ofile, &c, 1))
|
||||
break;
|
||||
skipit:
|
||||
prevchar = c;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue