diff options
author | bloodstalker <thabogre@gmail.com> | 2017-03-10 15:40:22 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2017-03-10 15:40:22 +0000 |
commit | 644799042f1f922b2a5d02ec6912913e11e6fd6a (patch) | |
tree | ee7d712cb7a02eceb6cf7e73779b1c194a68c9c8 /daemon/mutatorclient.c | |
parent | nothing worth mentioning (diff) | |
download | mutator-644799042f1f922b2a5d02ec6912913e11e6fd6a.tar.gz mutator-644799042f1f922b2a5d02ec6912913e11e6fd6a.zip |
fixed some of the coverity errors
Diffstat (limited to 'daemon/mutatorclient.c')
-rw-r--r-- | daemon/mutatorclient.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/daemon/mutatorclient.c b/daemon/mutatorclient.c index 9177024..d65eef5 100644 --- a/daemon/mutatorclient.c +++ b/daemon/mutatorclient.c @@ -29,6 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.* /*standard header libraries*/ #include <stdio.h> #include <string.h> +#include <stdlib.h> #include <sys/socket.h> #include <arpa/inet.h> #include <unistd.h> @@ -47,6 +48,7 @@ int main(int argc, char *argv[]) if (sock == -1) { printf ("could not create socket"); + exit(EXIT_FAILURE); } puts("created socket"); @@ -69,7 +71,7 @@ int main(int argc, char *argv[]) printf("enter massage: "); /*@DEVI-should later do something about reading from stdin*/ - if (fgets(message, 4000, stdin) == NULL) + if (fgets(message, 1000, stdin) == NULL) { puts("could not read from stdin"); } |