]> granicus.if.org Git - curl/commitdiff
smb: Fixed unnecessary initialisation of struct member variables
authorSteve Holme <steve_holme@hotmail.com>
Sun, 14 Dec 2014 12:27:57 +0000 (12:27 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Sun, 14 Dec 2014 12:27:57 +0000 (12:27 +0000)
There is no need to set the 'state' and 'result' member variables to
SMB_REQUESTING (0) and CURLE_OK (0) after the allocation via calloc()
as calloc() initialises the contents to zero.

lib/smb.c

index 1c1a58010a6ff609ce59e5b939414f7fa3b5d615..ffa75ea19c42b26a9c862411081b0a0270800bf1 100644 (file)
--- a/lib/smb.c
+++ b/lib/smb.c
@@ -234,9 +234,6 @@ static CURLcode smb_setup(struct connectdata *conn)
   if(!req)
     return CURLE_OUT_OF_MEMORY;
 
-  req->state = SMB_REQUESTING;
-  req->result = CURLE_OK;
-
   /* Parse the URL path */
   return smb_parse_url_path(conn);
 }