same procedure, simpler code
authorDaniel Stenberg <daniel@haxx.se>
Sat, 20 Dec 2008 22:47:49 +0000 (22:47 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 20 Dec 2008 22:47:49 +0000 (22:47 +0000)
lib/http.c

index 560d2e9..eaa50ee 100644 (file)
@@ -975,13 +975,7 @@ static CURLcode
 static
 send_buffer *add_buffer_init(void)
 {
-  send_buffer *blonk;
-  blonk = malloc(sizeof(send_buffer));
-  if(blonk) {
-    memset(blonk, 0, sizeof(send_buffer));
-    return blonk;
-  }
-  return NULL; /* failed, go home */
+  return calloc(sizeof(send_buffer), 1);
 }
 
 /*