aboutsummaryrefslogtreecommitdiffstats
path: root/xen/tools
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-11-27 12:43:25 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-11-27 12:43:25 +0000
commit7f470fe5a914aed091ed845a3f6c32027f8d5d13 (patch)
tree3088d267843ae3d5fbe9f13067f1207a3dd455ea /xen/tools
parentc44f6b31725b2142e963536ff0bd6ebcbfea2161 (diff)
downloadxen-7f470fe5a914aed091ed845a3f6c32027f8d5d13.tar.gz
xen-7f470fe5a914aed091ed845a3f6c32027f8d5d13.tar.bz2
xen-7f470fe5a914aed091ed845a3f6c32027f8d5d13.zip
Avoid warn_unused_result build failure on fgets().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/tools')
-rw-r--r--xen/tools/symbols.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/tools/symbols.c b/xen/tools/symbols.c
index 76eb88b585..bf632d7aea 100644
--- a/xen/tools/symbols.c
+++ b/xen/tools/symbols.c
@@ -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;
}