X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fprogress.c;h=99bdd5b616881d06078eeb5de6768e6cb6f945c3;hp=10ce59dddb758ceb4382b552f560e0e5d146af25;hb=5f0a2b3f0846dd4c2f72fc62e7171200d1fd6e06;hpb=370ff7a57640ff98cc399317927e8f3c51abad76 diff --git a/src/progress.c b/src/progress.c index 10ce59dd..99bdd5b6 100644 --- a/src/progress.c +++ b/src/progress.c @@ -206,10 +206,7 @@ struct dot_progress { static void * dot_create (long initial, long total) { - struct dot_progress *dp = xmalloc (sizeof (struct dot_progress)); - - memset (dp, 0, sizeof (*dp)); - + struct dot_progress *dp = xnew0 (struct dot_progress); dp->initial_length = initial; dp->total_length = total; @@ -477,9 +474,7 @@ static void display_image PARAMS ((char *)); static void * bar_create (long initial, long total) { - struct bar_progress *bp = xmalloc (sizeof (struct bar_progress)); - - memset (bp, 0, sizeof (*bp)); + struct bar_progress *bp = xnew0 (struct bar_progress); /* In theory, our callers should take care of this pathological case, but it can sometimes happen. */