Commit 66de5634 authored by Sylvestre Ledru's avatar Sylvestre Ledru Committed by Daniel Stenberg
Browse files

Improve code readbility

... by removing the else branch after a return, break or continue.

Closes #1310
parent db87bcfc
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -810,7 +810,6 @@ CURLcode Curl_is_connected(struct connectdata *conn,

        return CURLE_OK;
      }
      else
      infof(data, "Connection failed\n");
    }
    else if(rc & CURL_CSELECT_ERR)
+1 −2
Original line number Diff line number Diff line
@@ -130,7 +130,6 @@ inflate_stream(struct connectdata *conn,
        free(decomp);
        if(inflateEnd(z) == Z_OK)
          return exit_zlib(z, &k->zlib_init, result);
        else
        return exit_zlib(z, &k->zlib_init, process_zlib_error(conn, z));
      }

+2 −3
Original line number Diff line number Diff line
@@ -929,7 +929,6 @@ static char *get_line(char *buf, int len, FILE *input)
        }
        return b;
      }
      else
      /* read a partial, discard the next piece that ends with newline */
      partial = TRUE;
    }
+1 −1
Original line number Diff line number Diff line
@@ -469,7 +469,7 @@ Curl_addrinfo *Curl_str2addr(char *address, int port)
    /* This is a dotted IP address 123.123.123.123-style */
    return Curl_ip2addr(AF_INET, &in, address, port);
#ifdef ENABLE_IPV6
  else {
  {
    struct in6_addr in6;
    if(Curl_inet_pton(AF_INET6, address, &in6) > 0)
      /* This is a dotted IPv6 address ::1-style */
+3 −5
Original line number Diff line number Diff line
@@ -145,7 +145,6 @@ static int setcharset(unsigned char **p, unsigned char *charset)
      else if(c == ']') {
        if(something_found)
          return SETCHARSET_OK;
        else
        something_found = TRUE;
        state = CURLFNM_SCHS_RIGHTBR;
        charset[c] = 1;
@@ -244,7 +243,7 @@ static int setcharset(unsigned char **p, unsigned char *charset)
      if(c == ']') {
        return SETCHARSET_OK;
      }
      else if(c == '\\') {
      if(c == '\\') {
        c = *(++(*p));
        if(ISPRINT(c)) {
          charset[c] = 1;
@@ -345,7 +344,6 @@ static int loop(const unsigned char *pattern, const unsigned char *string)
      else if(*p == '\0') {
        if(*s == '\0')
          return CURL_FNMATCH_MATCH;
        else
        return CURL_FNMATCH_NOMATCH;
      }
      else if(*p == '\\') {
Loading