WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Avoid warn_unused_result build failure on

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Avoid warn_unused_result build failure on fgets().
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 01 Dec 2008 03:50:57 -0800
Delivery-date: Mon, 01 Dec 2008 03:54:35 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Avoid warn_unused_result build failure on fgets()., Xen patchbot-unstable <=