[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.2-testing] Avoid warn_unused_result build failure on fgets().



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1227791452 0
# Node ID 32ebe19ec04e6787035562919b55786c3982de1f
# Parent  007fc1ed1014e27f7615c1eeb62baef856ce8357
Avoid warn_unused_result build failure on fgets().
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   18839:8d5474a5c66bff3cea07998cafb30817e5b7970c
xen-unstable date:        Thu Nov 27 12:43:25 2008 +0000
---
 xen/tools/symbols.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -r 007fc1ed1014 -r 32ebe19ec04e xen/tools/symbols.c
--- a/xen/tools/symbols.c       Thu Nov 27 13:10:25 2008 +0000
+++ b/xen/tools/symbols.c       Thu Nov 27 13:10:52 2008 +0000
@@ -81,7 +81,8 @@ static int read_symbol(FILE *in, struct 
        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;
        }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.