From 1f8e8139192d5531a2f94bcc348e462c63b3794f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 7 Mar 2018 14:43:12 +0100 Subject: openldap: white space changes, fixed up the copyright years --- lib/openldap.c | 37 +++++++++++++++++++------------------ 1 file 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, - * Copyright (C) 2011 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 2010, Howard Chu, + * Copyright (C) 2011 - 2018, Daniel Stenberg, , 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; -- cgit v1.2.1