summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jones <daniel@danieljon.es>2019-03-06 23:41:00 -0500
committerDaniel Jones <daniel@danieljon.es>2019-03-06 23:41:00 -0500
commit33057fef12249184649c708d1665a31c60ddfc2c (patch)
treeb63fa4c824ffad7c8c0ad59ed220cd9893386acb
parent62008cec2f1e4002a41ce0ad37449e64abb9b10e (diff)
downloadurlopener-33057fef12249184649c708d1665a31c60ddfc2c.tar.gz
urlopener-33057fef12249184649c708d1665a31c60ddfc2c.zip
error handling
-rw-r--r--urlopen.c3
1 files changed, 3 insertions, 0 deletions
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)