From 34f3d2c19b633f9a0f73026ac5aa98b43f0ebf19 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sun, 26 Mar 2017 13:23:51 +0200 Subject: [PATCH] Fix %li -> %lu in format string because the argument type is 'unsigned long' (">memory") --- request.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/request.c b/request.c index 14e775d0..99a725d7 100644 --- a/request.c +++ b/request.c @@ -460,14 +460,14 @@ void process_request(char *client_message, int *sock) char *structprefix = calloc(2, sizeof(char)); double formated = 0.0; format_memory_size(structprefix, structbytes, &formated); - sprintf(server_message,"memory allocated for internal data structure: %li bytes (%.2f %sB)\n",structbytes,formated,structprefix); + sprintf(server_message,"memory allocated for internal data structure: %lu bytes (%.2f %sB)\n",structbytes,formated,structprefix); swrite(server_message, *sock); free(structprefix); unsigned long int dynamicbytes = memory.wildcarddomains + memory.domainnames + memory.clientips + memory.clientnames + memory.forwardedips + memory.forwardednames + memory.forwarddata; char *dynamicprefix = calloc(2, sizeof(char)); format_memory_size(dynamicprefix, dynamicbytes, &formated); - sprintf(server_message,"dynamically allocated allocated memory used for strings: %li bytes (%.2f %sB)\n",dynamicbytes,formated,dynamicprefix); + sprintf(server_message,"dynamically allocated allocated memory used for strings: %lu bytes (%.2f %sB)\n",dynamicbytes,formated,dynamicprefix); swrite(server_message, *sock); free(dynamicprefix);