check for fgets return value
This commit is contained in:
committed by
Andrew Johnson
parent
b8e70783d8
commit
7449a947ed
@@ -60,7 +60,9 @@ MAIN(readlineTest)
|
||||
|
||||
do {
|
||||
// expected strings are always single line strings
|
||||
fgets(line_expect, 499, fp_expect);
|
||||
if (! fgets(line_expect, 499, fp_expect)) {
|
||||
testAbort("failed to read an expected line");
|
||||
}
|
||||
icin = 0;
|
||||
while ((c = line_expect[icin]) && isspace(c)) {
|
||||
icin++;
|
||||
|
||||
Reference in New Issue
Block a user