]> granicus.if.org Git - curl/commitdiff
ldap: Prefer 'CURLcode result' for curl result codes
authorSteve Holme <steve_holme@hotmail.com>
Sat, 3 Jan 2015 17:45:51 +0000 (17:45 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Sat, 3 Jan 2015 18:46:32 +0000 (18:46 +0000)
lib/ldap.c

index e6f975a1c5d99f11e5bee49dc81d8b36d72f03b0..513b4a8b036f8bdc9b9282d60add312b91a6b72b 100644 (file)
@@ -459,17 +459,17 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
           if((attr_len > 7) &&
              (strcmp(";binary", (char *) attribute + (attr_len - 7)) == 0)) {
             /* Binary attribute, encode to base64. */
-            CURLcode error = Curl_base64_encode(data,
-                                                vals[i]->bv_val,
-                                                vals[i]->bv_len,
-                                                &val_b64,
-                                                &val_b64_sz);
-            if(error) {
+            result = Curl_base64_encode(data,
+                                        vals[i]->bv_val,
+                                        vals[i]->bv_len,
+                                        &val_b64,
+                                        &val_b64_sz);
+            if(result) {
               ldap_value_free_len(vals);
               ldap_memfree(attribute);
               if(ber)
                 ber_free(ber, 0);
-              result = error;
+
               goto quit;
             }