]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
Avoid warn_unused_result build failure on fgets().
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 27 Nov 2008 13:09:34 +0000 (13:09 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 27 Nov 2008 13:09:34 +0000 (13:09 +0000)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset:   18839:8d5474a5c66bff3cea07998cafb30817e5b7970c
xen-unstable date:        Thu Nov 27 12:43:25 2008 +0000

xen/tools/symbols.c

index 76eb88b585c97d0966dec3b4c3efb0c773b871db..bf632d7aeae73c1dc42945bc63addec5ffb06edf 100644 (file)
@@ -81,7 +81,8 @@ static int read_symbol(FILE *in, struct sym_entry *s)
        if (rc != 3) {
                if (rc != EOF) {
                        /* skip line */
-                       fgets(str, 500, in);
+                       if (fgets(str, 500, in) == NULL)
+                               return -1; /* must check fgets result */
                }
                return -1;
        }