Skip to content

Commit

Permalink
io: return NULL if ferror indicates an error
Browse files Browse the repository at this point in the history
Instead of going the non-error route and then returning the empty
string.
  • Loading branch information
gicmo committed Apr 10, 2018
1 parent bb38301 commit 84dcce7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common/bolt-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ bolt_read_value_at (int dirfd,
"io error of file %s: %s",
name,
g_strerror (errno));
return NULL;
}

line[0] = '\0';
Expand Down

0 comments on commit 84dcce7

Please sign in to comment.