summaryrefslogtreecommitdiffstats
path: root/lib/libfetch/fetch.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2000-05-07 20:02:52 +0000
committerdes <des@FreeBSD.org>2000-05-07 20:02:52 +0000
commit0ee0a9878bdb7b86f331fdd3fb15fcc3ccec676d (patch)
treebb215a091c8bd5e21001cbdcefc6616a30185d58 /lib/libfetch/fetch.c
parent58fa435eca3fde7a5dd665c01fded46eb7e9735f (diff)
downloadFreeBSD-src-0ee0a9878bdb7b86f331fdd3fb15fcc3ccec676d.zip
FreeBSD-src-0ee0a9878bdb7b86f331fdd3fb15fcc3ccec676d.tar.gz
Use sizeof more consistently.
Diffstat (limited to 'lib/libfetch/fetch.c')
-rw-r--r--lib/libfetch/fetch.c4
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();
OpenPOWER on IntegriCloud