diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-03-07 14:43:12 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-03-12 07:47:07 +0100 |
commit | 1f8e8139192d5531a2f94bcc348e462c63b3794f (patch) | |
tree | 5a9ed0f41ffe26dd70ca8b0c4827abf187927d0c | |
parent | 9889db043393092e9d4b5a42720bba0b3d58deba (diff) |
openldap: white space changes, fixed up the copyright years
-rw-r--r-- | lib/openldap.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/lib/openldap.c b/lib/openldap.c index 6927275cf..187c89994 100644 --- a/lib/openldap.c +++ b/lib/openldap.c @@ -5,8 +5,8 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2010, 2017, Howard Chu, <hyc@openldap.org> - * Copyright (C) 2011 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 2010, Howard Chu, <hyc@openldap.org> + * Copyright (C) 2011 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -221,7 +221,7 @@ static CURLcode ldap_connect(struct connectdata *conn, bool *done) if(conn->handler->flags & PROTOPT_SSL) *ptr++ = 's'; snprintf(ptr, sizeof(hosturl)-(ptr-hosturl), "://%s:%d", - conn->host.name, conn->remote_port); + conn->host.name, conn->remote_port); #ifdef CURL_OPENLDAP_DEBUG static int do_trace = 0; @@ -286,7 +286,7 @@ static CURLcode ldap_connecting(struct connectdata *conn, bool *done) tvp = &tv; -retry: + retry: if(!li->didbind) { char *binddn; struct berval passwd; @@ -472,7 +472,7 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf, return ret; for(ent = ldap_first_message(li->ld, msg); ent; - ent = ldap_next_message(li->ld, ent)) { + ent = ldap_next_message(li->ld, ent)) { struct berval bv, *bvals; int binary = 0, msgtype; CURLcode writeerr; @@ -540,7 +540,8 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf, rc = ldap_get_attribute_ber(li->ld, ent, ber, &bv, &bvals)) { int i; - if(bv.bv_val == NULL) break; + if(bv.bv_val == NULL) + break; if(bv.bv_len > 7 && !strncmp(bv.bv_val + bv.bv_len - 7, ";binary", 7)) binary = 1; @@ -555,24 +556,24 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf, return -1; } - writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)bv.bv_val, - bv.bv_len); - if(writeerr) { - *err = writeerr; - return -1; - } + writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)bv.bv_val, + bv.bv_len); + if(writeerr) { + *err = writeerr; + return -1; + } writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)":", 1); - if(writeerr) { - *err = writeerr; - return -1; - } + if(writeerr) { + *err = writeerr; + return -1; + } data->req.bytecount += bv.bv_len + 2; if(!binary) { /* check for leading or trailing whitespace */ if(ISSPACE(bvals[i].bv_val[0]) || - ISSPACE(bvals[i].bv_val[bvals[i].bv_len-1])) + ISSPACE(bvals[i].bv_val[bvals[i].bv_len-1])) binval = 1; else { /* check for unprintable characters */ @@ -610,7 +611,7 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf, data->req.bytecount += 2; if(val_b64_sz > 0) { writeerr = Curl_client_write(conn, CLIENTWRITE_BODY, val_b64, - val_b64_sz); + val_b64_sz); if(writeerr) { *err = writeerr; return -1; |