summaryrefslogtreecommitdiff
path: root/usr.sbin/ldapd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2018-12-05 06:44:10 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2018-12-05 06:44:10 +0000
commit34861819bd160e2f0e035f7ec328d48755a1a942 (patch)
treeb3313ff88f5cdf1f0be3b1b326b264249eb257d3 /usr.sbin/ldapd
parent143a20ac9ee58c51234b359ce6f42938f423369b (diff)
key.data is a void *, on gcc archs doing a %s printf with such a pointer
results in a warning. Use either the original string value or use a cast. This makes both clang and gcc happy. OK guenther@
Diffstat (limited to 'usr.sbin/ldapd')
-rw-r--r--usr.sbin/ldapd/search.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/ldapd/search.c b/usr.sbin/ldapd/search.c
index 85b3d2d2b86..8aed3a50245 100644
--- a/usr.sbin/ldapd/search.c
+++ b/usr.sbin/ldapd/search.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: search.c,v 1.23 2018/07/31 11:01:00 claudio Exp $ */
+/* $OpenBSD: search.c,v 1.24 2018/12/05 06:44:09 claudio Exp $ */
/*
* Copyright (c) 2009, 2010 Martin Hedenfalk <martin@bzero.se>
@@ -322,7 +322,8 @@ conn_search(struct search *search)
if (search->plan->indexed) {
search->cindx = TAILQ_FIRST(&search->plan->indices);
key.data = search->cindx->prefix;
- log_debug("init index scan on [%s]", key.data);
+ log_debug("init index scan on [%s]",
+ search->cindx->prefix);
} else {
if (*search->basedn)
key.data = search->basedn;
@@ -342,7 +343,8 @@ conn_search(struct search *search)
op = BT_NEXT;
if (rc == BT_SUCCESS && search->plan->indexed) {
- log_debug("found index %.*s", (int)key.size, key.data);
+ log_debug("found index %.*s", (int)key.size,
+ (char *)key.data);
if (!has_prefix(&key, search->cindx->prefix)) {
log_debug("scanned past index prefix [%s]",
@@ -362,7 +364,8 @@ conn_search(struct search *search)
memset(&key, 0, sizeof(key));
key.data = search->cindx->prefix;
key.size = strlen(key.data);
- log_debug("re-init cursor on [%s]", key.data);
+ log_debug("re-init cursor on [%s]",
+ search->cindx->prefix);
op = BT_CURSOR;
continue;
}