]> granicus.if.org Git - curl/commitdiff
ntlm_wb_response: fix "statement not reached"
authorDaniel Stenberg <daniel@haxx.se>
Wed, 10 Dec 2014 21:43:44 +0000 (22:43 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 10 Dec 2014 21:45:19 +0000 (22:45 +0100)
... and I could use a break instead of a goto to end the loop.

Bug: http://curl.haxx.se/mail/lib-2014-12/0089.html
Reported-by: Tor Arntsen
lib/curl_ntlm_wb.c

index b83326a9ddc37226a480766e8e378e1174f5fa61..5e2d79cb40fd8f1c58deeaded36422a6a7f9a41f 100644 (file)
@@ -294,7 +294,7 @@ static CURLcode ntlm_wb_response(struct connectdata *conn,
     len_out += size;
     if(buf[len_out - 1] == '\n') {
       buf[len_out - 1] = '\0';
-      goto wrfinish;
+      break;
     }
     newbuf = realloc(buf, len_out + NTLM_BUFSIZE);
     if(!newbuf) {
@@ -303,8 +303,7 @@ static CURLcode ntlm_wb_response(struct connectdata *conn,
     }
     buf = newbuf;
   }
-  goto done;
-wrfinish:
+
   /* Samba/winbind installed but not configured */
   if(state == NTLMSTATE_TYPE1 &&
      len_out == 3 &&