diff stream/http.c @ 32636:146fb0958630

Replace two malloc+memset with calloc.
author cboesch
date Sun, 19 Dec 2010 14:19:04 +0000
parents 2653cb380532
children b171c744cd06
line wrap: on
line diff
--- a/stream/http.c	Sun Dec 19 14:15:44 2010 +0000
+++ b/stream/http.c	Sun Dec 19 14:19:04 2010 +0000
@@ -298,9 +298,8 @@
 http_new_header(void) {
 	HTTP_header_t *http_hdr;
 
-	http_hdr = malloc(sizeof(HTTP_header_t));
+	http_hdr = calloc(1, sizeof(*http_hdr));
 	if( http_hdr==NULL ) return NULL;
-	memset( http_hdr, 0, sizeof(HTTP_header_t) );
 
 	return http_hdr;
 }