util_proc: Fix memory allocation error messages Signed-off-by: Michael Holzheu --- libutil/util_proc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) --- a/libutil/util_proc.c +++ b/libutil/util_proc.c @@ -54,8 +54,7 @@ util_proc_read_special_file(const char * count = 0; data = (char *) malloc(current_size); if (data == NULL) { - printf("Could not allocate %lld bytes of memory", - (unsigned long long) size); + printf("Could not allocate %zu bytes of memory", current_size); fclose(file); return -1; } @@ -69,8 +68,8 @@ util_proc_read_special_file(const char * if (count >= current_size) { new_data = (char *) malloc(current_size * 2); if (new_data == NULL) { - printf("Could not allocate %lld bytes of memory", - (unsigned long long) size); + printf("Could not allocate %zu bytes of memory", + current_size * 2); free(data); fclose(file); return -1;