mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 20:08:17 +00:00
port gcc 4.3.x warning fixes from trunk to this branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@153743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user