From 33057fef12249184649c708d1665a31c60ddfc2c Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Wed, 6 Mar 2019 23:41:00 -0500 Subject: error handling --- urlopen.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/urlopen.c b/urlopen.c index e68f272..d70c7b9 100644 --- a/urlopen.c +++ b/urlopen.c @@ -84,7 +84,10 @@ getext(char *url) { char *buff = malloc(BUFFSIZE); if (buff == NULL) + { + perror("malloc"); return 0; + } strncpy(buff, programs[i][0], BUFFSIZE-1); char *t = strtok(buff, ","); while (t != NULL) -- cgit v1.2.3