From 99548e6f28936bc381a74fd951752d984e3eba0a Mon Sep 17 00:00:00 2001 Message-Id: <99548e6f28936bc381a74fd951752d984e3eba0a.1338294098.git.hahn@univention.de> In-Reply-To: References: From: Philipp Hahn Date: Tue, 29 May 2012 14:19:54 +0200 Subject: [PATCH 4/4] Ticket #2012050221003422: Fix format strings Organization: Univention GmbH, Bremen, Germany %zd for size_t. %p for void *. %d:%s for errno,strerror(errno) instead of read() return value. --- .../src/cache_lowlevel.c | 4 ++-- .../univention-directory-listener/src/network.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/branches/ucs-3.0/ucs/management/univention-directory-listener/src/cache_lowlevel.c b/branches/ucs-3.0/ucs/management/univention-directory-listener/src/cache_lowlevel.c index c48cc2d..11be699 100644 --- a/branches/ucs-3.0/ucs/management/univention-directory-listener/src/cache_lowlevel.c +++ b/branches/ucs-3.0/ucs/management/univention-directory-listener/src/cache_lowlevel.c @@ -181,7 +181,7 @@ static int read_header(void *data, u_int32_t size, u_int32_t *pos, void **key_da *data_data = (void*)((char*)data+*pos); if (*data_size != strlen(*data_data)+1) - univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_INFO, "data_size and strlen don't match: %d != %d", *data_size, strlen(*data_data)+1); + univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_INFO, "data_size and strlen don't match: %d != %zd", *data_size, strlen(*data_data)+1); *pos += *data_size; } else { *data_size = 0; @@ -236,7 +236,7 @@ int parse_entry(void *data, u_int32_t size, CacheEntry *entry) (*attribute)->value_count = 0; entry->attribute_count++; - univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ALL, "%s is at 0x%x", (*attribute)->name, (unsigned int)*attribute); + univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ALL, "%s is at %p", (*attribute)->name, *attribute); } (*attribute)->values = realloc((*attribute)->values, ((*attribute)->value_count+2)*sizeof(char*)); if ((*attribute)->values == NULL) diff --git a/branches/ucs-3.0/ucs/management/univention-directory-listener/src/network.c b/branches/ucs-3.0/ucs/management/univention-directory-listener/src/network.c index 3c3051e..a012f3d 100644 --- a/branches/ucs-3.0/ucs/management/univention-directory-listener/src/network.c +++ b/branches/ucs-3.0/ucs/management/univention-directory-listener/src/network.c @@ -147,7 +147,7 @@ static int recv_block(NotifierClient *client, char **back, time_t timeout) univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "connection to notifier was closed"); return 0; } else if (r < 0) { - univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "error %d while receiving from notifier", r); + univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "error %d: %s while receiving from notifier", errno, strerror(errno)); return 0; } -- 1.7.1