From bd4eb070f3b292617be20bda069cac47df2f7495 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Sun, 2 Nov 2008 18:52:13 +0000 Subject: bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153616 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- agi/eagi-test.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'agi/eagi-test.c') diff --git a/agi/eagi-test.c b/agi/eagi-test.c index 704fd7b22..c40b85d1e 100644 --- a/agi/eagi-test.c +++ b/agi/eagi-test.c @@ -24,7 +24,9 @@ static int read_environment(void) char *val; /* Read environment */ for(;;) { - fgets(buf, sizeof(buf), stdin); + if (!fgets(buf, sizeof(buf), stdin)) { + return -1; + } if (feof(stdin)) return -1; buf[strlen(buf) - 1] = '\0'; @@ -68,7 +70,9 @@ static char *wait_result(void) return NULL; } if (FD_ISSET(STDIN_FILENO, &fds)) { - fgets(astresp, sizeof(astresp), stdin); + if (!fgets(astresp, sizeof(astresp), stdin)) { + return NULL; + } if (feof(stdin)) { fprintf(stderr, "Got hungup on apparently\n"); return NULL; -- cgit v1.2.3