Revert "Imported Upstream version 7.44.0"
[platform/upstream/curl.git] / lib / openldap.c
index bee552f..b94c034 100644 (file)
@@ -5,8 +5,8 @@
  *                | (__| |_| |  _ <| |___
  *                 \___|\___/|_| \_\_____|
  *
- * Copyright (C) 2010, Howard Chu, <hyc@openldap.org>
- * Copyright (C) 2011 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2010, 2013, Howard Chu, <hyc@openldap.org>
+ * Copyright (C) 2011 - 2014, 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
 #include "vtls/vtls.h"
 #include "transfer.h"
 #include "curl_ldap.h"
+#include "curl_memory.h"
 #include "curl_base64.h"
 #include "connect.h"
-#include "curl_printf.h"
 
-/* The last #include files should be: */
-#include "curl_memory.h"
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+
 #include "memdebug.h"
 
 #ifndef _LDAP_PVT_H
@@ -229,7 +230,7 @@ static CURLcode ldap_connecting(struct connectdata *conn, bool *done)
   ldapconninfo *li = conn->proto.generic;
   struct SessionHandle *data = conn->data;
   LDAPMessage *msg = NULL;
-  struct timeval tv = {0, 1}, *tvp;
+  struct timeval tv = {0,1}, *tvp;
   int rc, err;
   char *info = NULL;
 
@@ -380,7 +381,7 @@ static CURLcode ldap_do(struct connectdata *conn, bool *done)
     failf(data, "LDAP local: ldap_search_ext %s", ldap_err2string(rc));
     return CURLE_LDAP_SEARCH_FAILED;
   }
-  lr = calloc(1, sizeof(ldapreqinfo));
+  lr = calloc(1,sizeof(ldapreqinfo));
   if(!lr)
     return CURLE_OUT_OF_MEMORY;
   lr->msgid = msgid;
@@ -422,7 +423,7 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf,
   LDAPMessage *msg = NULL;
   LDAPMessage *ent;
   BerElement *ber = NULL;
-  struct timeval tv = {0, 1};
+  struct timeval tv = {0,1};
 
   (void)len;
   (void)buf;