aboutsummaryrefslogtreecommitdiff
path: root/dpid/dpidc.c
diff options
context:
space:
mode:
Diffstat (limited to 'dpid/dpidc.c')
-rw-r--r--dpid/dpidc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dpid/dpidc.c b/dpid/dpidc.c
index 971281d5..2d3c716f 100644
--- a/dpid/dpidc.c
+++ b/dpid/dpidc.c
@@ -98,7 +98,8 @@ int main(int argc, char *argv[])
} else if (strcmp(argv[1], "chat") == 0) {
printf("Please enter the message: ");
bzero(buffer,256);
- fgets(buffer,255,stdin);
+ if (fgets(buffer,255,stdin) == NULL)
+ MSG_ERR("dpidc: Can't read the message\n");
} else {
MSG_ERR("main: Unknown operation '%s'\n", argv[1]);
print_usage(argv[0]);