[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Avoid warn_unused_result build failure on fgets().
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1227789805 0 # Node ID 8d5474a5c66bff3cea07998cafb30817e5b7970c # Parent 840b761e07c1f8b6146584df320ddbd6bce07fae Avoid warn_unused_result build failure on fgets(). Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx> --- xen/tools/symbols.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -r 840b761e07c1 -r 8d5474a5c66b xen/tools/symbols.c --- a/xen/tools/symbols.c Thu Nov 27 11:24:52 2008 +0000 +++ b/xen/tools/symbols.c Thu Nov 27 12:43:25 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |