diff options
Diffstat (limited to 'lib/libfetch/fetch.c')
-rw-r--r-- | lib/libfetch/fetch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libfetch/fetch.c b/lib/libfetch/fetch.c index 3c944a1..bc2f565 100644 --- a/lib/libfetch/fetch.c +++ b/lib/libfetch/fetch.c @@ -224,7 +224,7 @@ fetchParseURL(char *URL) int i; /* allocate struct url */ - if ((u = calloc(1, sizeof(struct url))) == NULL) { + if ((u = calloc(1, sizeof *u)) == NULL) { errno = ENOMEM; _fetch_syserr(); return NULL; @@ -284,7 +284,7 @@ nohost: /* document */ if (*p) { struct url *t; - t = realloc(u, sizeof(*u)+strlen(p)-1); + t = realloc(u, sizeof *u + strlen(p) - 1); if (t == NULL) { errno = ENOMEM; _fetch_syserr(); |