From: <fla...@gm...> - 2007-12-18 21:34:29
|
# HG changeset patch # User Diego 'Flameeyes' Pettenò <fla...@gm...> # Date 1198013535 -3600 # Node ID 6048454f05a234dcde6498fb22bb3112a5f436c6 # Parent 00ea7d7e220c628e71dd1adc1d38eb0c273ab065 Avoid a multiplication. diff -r 6048454f05a234dcde6498fb22bb3112a5f436c6 -r 00ea7d7e220c628e71dd1adc1d38eb0c273ab065 src/input/input_http.c --- a/src/input/input_http.c Tue Dec 18 22:32:15 2007 +0100 +++ b/src/input/input_http.c Tue Dec 18 22:23:59 2007 +0100 @@ -249,7 +249,7 @@ static int http_plugin_basicauth (const if (len < enclen) return -1; - tmp = malloc (sizeof(char) * (totlen + 1)); + tmp = malloc (totlen + 1); strcpy (tmp, user); strcat (tmp, ":"); if (password != NULL) |