summaryrefslogtreecommitdiff
path: root/pjsip-apps/src/pjsua/pjsua_app.c
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2009-01-01 22:08:21 +0000
committerBenny Prijono <bennylp@teluu.com>2009-01-01 22:08:21 +0000
commite8292035968488eb3a9b61a431afc8c9a39f51d3 (patch)
tree37b6e83a23282b53ed0ab8a602498798bb56c57d /pjsip-apps/src/pjsua/pjsua_app.c
parent423bd3b19d5611412da90b87f6989dc89339defa (diff)
Fixed gcc-4.3.2 warnings with the warn_unused_result flag in some APIs
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2408 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps/src/pjsua/pjsua_app.c')
-rw-r--r--pjsip-apps/src/pjsua/pjsua_app.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/pjsip-apps/src/pjsua/pjsua_app.c b/pjsip-apps/src/pjsua/pjsua_app.c
index 882a11bc..5414b087 100644
--- a/pjsip-apps/src/pjsua/pjsua_app.c
+++ b/pjsip-apps/src/pjsua/pjsua_app.c
@@ -2750,7 +2750,8 @@ static pj_bool_t simple_input(const char *title, char *buf, pj_size_t len)
char *p;
printf("%s (empty to cancel): ", title); fflush(stdout);
- fgets(buf, len, stdin);
+ if (fgets(buf, len, stdin) == NULL)
+ return PJ_FALSE;
/* Remove trailing newlines. */
for (p=buf; ; ++p) {
@@ -2794,7 +2795,8 @@ static void ui_input_url(const char *title, char *buf, int len,
printf("%s: ", title);
fflush(stdout);
- fgets(buf, len, stdin);
+ if (fgets(buf, len, stdin) == NULL)
+ return;
len = strlen(buf);
/* Left trim */
@@ -3023,7 +3025,8 @@ static void manage_codec_prio(void)
"(e.g. \"speex/16000 200\"), empty to cancel:");
printf("Codec name (\"*\" for all) and priority: ");
- fgets(input, sizeof(input), stdin);
+ if (fgets(input, sizeof(input), stdin) == NULL)
+ return;
if (input[0]=='\r' || input[0]=='\n') {
puts("Done");
return;