diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2022-01-11 15:59:43 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2022-01-11 15:59:43 +0000 |
commit | c5038e542fe9abf878da13812f229372b5fdcf92 (patch) | |
tree | 7faa61c1fcae005d2f34ee543521dd669d4ddf56 | |
parent | 7c1178069f1c58a05ec56a94ca6ba124215a947b (diff) | |
download | gobject-introspection-c5038e542fe9abf878da13812f229372b5fdcf92.tar.gz |
cmph: Handle fgets() return value
Newer versions of the GNU libc have started to warn if the result of the
call is unused.
-rw-r--r-- | girepository/cmph/cmph.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/girepository/cmph/cmph.c b/girepository/cmph/cmph.c index 0c4b67d1..3fd40a29 100644 --- a/girepository/cmph/cmph.c +++ b/girepository/cmph/cmph.c @@ -155,7 +155,7 @@ static cmph_uint32 count_nlfile_keys(FILE *fd) while(1) { char buf[BUFSIZ]; - fgets(buf, BUFSIZ, fd); + if (fgets(buf, BUFSIZ, fd) == NULL) break; if (feof(fd)) break; if (buf[strlen(buf) - 1] != '\n') continue; ++count; |