kbuild: kallsysms: throw away result of fgets()
diff mbox

Message ID 1274748661-15253-2-git-send-email-ben-linux@fluff.org
State New, archived
Headers show

Commit Message

Ben Dooks May 25, 2010, 12:50 a.m. UTC
None

Patch
diff mbox

diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 86c3896..87c3d38 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -109,7 +109,11 @@  static int read_symbol(FILE *in, struct sym_entry *s)
 	if (rc != 3) {
 		if (rc != EOF) {
 			/* skip line */
-			fgets(str, 500, in);
+			char *tmp = fgets(str, 500, in);
+
+			/* shut unused-result warning up */
+			if (!tmp)
+				str[0] = '\0';
 		}
 		return -1;
 	}