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:
Daniel Stenberg 2011-06-11 23:01:09 +02:00
parent ee015947d4
commit 950fb3efcc
2 changed files with 6 additions and 3 deletions

View file

@ -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;
}