diff options
author | Daniel Stenberg <daniel@haxx.se> | 2011-06-11 23:01:09 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2011-06-11 23:01:09 +0200 |
commit | 950fb3efcc929d3f5a26852c4f64ccd038ce43a0 (patch) | |
tree | 026ccd9c89128c18eb2efb820692bfb3496721d5 /tests/libtest | |
parent | ee015947d4b82c53c16c50502e46c1af339d0c25 (diff) |
write: add return code checks when used
These were just warnings in test code but it still makes it nicer to not
generate them.
Diffstat (limited to 'tests/libtest')
-rw-r--r-- | tests/libtest/lib556.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/libtest/lib556.c b/tests/libtest/lib556.c index da29a4678..67da87f40 100644 --- a/tests/libtest/lib556.c +++ b/tests/libtest/lib556.c @@ -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)); |