mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
cmph: Handle fgets() return value
Newer versions of the GNU libc have started to warn if the result of the call is unused.
This commit is contained in:
parent
4398e1fde2
commit
3d999b47e5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user