abis_nm: ceck fseek() return code in is_last_line()

Change-Id: I8ed4e703625c9da959e0938cd1eb3f0c73a2d4d0
Fixes: Coverity CID 57643
This commit is contained in:
Harald Welte 2016-11-26 14:11:16 +01:00
parent 3c165d02bb
commit be67050a36
1 changed files with 3 additions and 1 deletions

View File

@ -838,7 +838,9 @@ static int is_last_line(FILE *stream)
return 1;
if (!fgets(next_seg_buf, sizeof(next_seg_buf)-2, stream)) {
fseek(stream, pos, SEEK_SET);
int rc = fseek(stream, pos, SEEK_SET);
if (rc < 0)
return rc;
return 1;
}