Blob Blame History Raw
From c5950ffa10303383596ea7611844185901d74e2f Mon Sep 17 00:00:00 2001
From: Noriko Hosoi <nhosoi@redhat.com>
Date: Tue, 25 Feb 2014 15:09:34 -0800
Subject: [PATCH 92/92] Ticket 571 (dup 47361) - Empty control list causes LDAP
 protocol error is thrown

covscan Defect type:  Compiler Warnings
2. 389-ds-base-1.3.1.6/ldap/servers/slapd/control.c:364:25:
   warning - format '%d' expects argument of type 'int',
   but argument 4 has type 'PRUint64' [-Wformat=]
Introduced by commit d695afb6a637432e880296d8552f466981c0796c
Fix: Replaced %d with % NSPRIu64

Reviewed by rmeggins@redhat.com (Thank you, Rich!!)
(cherry picked from commit 383db4a27cc417c1708989d84cf0e4445936ae9f)
(cherry picked from commit 8b92149bf229d12052a2f349611e5f639fc57ef8)
(cherry picked from commit 86b76ef2466659efd31b07bc02b02daf444a9cde)
---
 ldap/servers/slapd/control.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ldap/servers/slapd/control.c b/ldap/servers/slapd/control.c
index e614d50..1229e9f 100644
--- a/ldap/servers/slapd/control.c
+++ b/ldap/servers/slapd/control.c
@@ -360,8 +360,8 @@ get_ldapmessage_controls_ext(
                 slapi_pblock_set(pb, SLAPI_REQCONTROLS, NULL);
                 slapi_pblock_set(pb, SLAPI_MANAGEDSAIT, &ctrl_not_found);
                 slapi_pblock_set(pb, SLAPI_PWPOLICY, &ctrl_not_found);
-                slapi_log_error(SLAPI_LOG_CONNS, "connection", "Warning: conn=%d op=%d contains an empty list of controls\n",
-                        pb->pb_conn->c_connid, pb->pb_op->o_opid);
+                slapi_log_error(SLAPI_LOG_CONNS, "connection", "Warning: conn=%" NSPRIu64 " op=%d contains an empty list of controls\n",
+                        (long long unsigned int)pb->pb_conn->c_connid, pb->pb_op->o_opid);
         } else {
                 if ((tag != LBER_END_OF_SEQORSET) && (len != -1)) {
                         goto free_and_return;
-- 
1.8.1.4