- fix uninitialized value
authorMatthias Wachs <wachs@net.in.tum.de>
Fri, 19 Oct 2012 08:38:45 +0000 (08:38 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Fri, 19 Oct 2012 08:38:45 +0000 (08:38 +0000)
src/transport/plugin_transport_http_client.c

index 07a587c66ff5f54cc4e527902b7f7dc01d9f19f7..a710cd3c2aea47c6d2b45050b0a13bce9b3959bd 100644 (file)
@@ -372,7 +372,7 @@ client_exist_session (struct HTTP_Client_Plugin *plugin, struct Session *s)
 static int
 client_log (CURL * curl, curl_infotype type, char *data, size_t size, void *cls)
 {
-  char *ttype;
+  char *ttype = "UNSPECIFIED";
   if ((type == CURLINFO_TEXT) || (type == CURLINFO_HEADER_IN) || (type == CURLINFO_HEADER_OUT))
   {
     char text[size + 2];
@@ -388,6 +388,7 @@ client_log (CURL * curl, curl_infotype type, char *data, size_t size, void *cls)
         ttype = "HEADER_OUT";
         break;
       default:
+        ttype = "UNSPECIFIED";
         break;
     }