diff options
author | Daniel Jones <daniel@danieljon.es> | 2019-03-06 23:41:00 -0500 |
---|---|---|
committer | Daniel Jones <daniel@danieljon.es> | 2019-03-06 23:41:00 -0500 |
commit | 33057fef12249184649c708d1665a31c60ddfc2c (patch) | |
tree | b63fa4c824ffad7c8c0ad59ed220cd9893386acb | |
parent | 62008cec2f1e4002a41ce0ad37449e64abb9b10e (diff) | |
download | urlopener-33057fef12249184649c708d1665a31c60ddfc2c.tar.gz urlopener-33057fef12249184649c708d1665a31c60ddfc2c.zip |
error handling
-rw-r--r-- | urlopen.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) |