diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-02 23:56:13 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-02 23:56:13 +0000 |
commit | ee246d0e0519c6aa7cb0aea17ea92c9a5c2dc16f (patch) | |
tree | 80dccc06626175232f48f4c2cde5b9f5ba602632 /agi/eagi-test.c | |
parent | 11aedae560fa003f20ee8d7a02b7aa2fc17ae13a (diff) |
import gcc 4.3.2 warning fixes from trunk, with a few changes specific to this branch
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@153710 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'agi/eagi-test.c')
-rw-r--r-- | agi/eagi-test.c | 8 |
1 files changed, 6 insertions, 2 deletions
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; |