Skip to content
Snippets Groups Projects
Commit 950fb3ef authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

write: add return code checks when used

These were just warnings in test code but it still makes it nicer to not
generate them.
parent ee015947
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment