build system: fix compiler warnings

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 57734b5..866a7c5 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -142,7 +142,8 @@
 		check_stdin();
 	case ask_all:
 		fflush(stdout);
-		fgets(line, 128, stdin);
+		if (!fgets(line, 128, stdin))
+			exit(1);
 		return;
 	case set_default:
 		printf("%s\n", def);
@@ -390,7 +391,8 @@
 			check_stdin();
 		case ask_all:
 			fflush(stdout);
-			fgets(line, 128, stdin);
+			if (!fgets(line, 128, stdin))
+				exit(1);
 			strip(line);
 			if (line[0] == '?') {
 				printf("\n%s\n", menu->sym->help ?