From 42c9ce52aaf4d5a060ac435a9a988005a8e0807a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 17 Jan 2007 14:27:15 +0100 Subject: [PATCH] hexdump: don't use memset with zero lenght gcc 4.1.0: "warning: memset used with constant zero length parameter...." Signed-off-by: Karel Zak --- text-utils/display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/text-utils/display.c b/text-utils/display.c index 25d7f043..3d4bdcd9 100644 --- a/text-utils/display.c +++ b/text-utils/display.c @@ -255,7 +255,8 @@ get(void) (void)printf("*\n"); return(NULL); } - memset((char *)curp + nread, 0, need); + if (need > 0) + memset((char *)curp + nread, 0, need); eaddress = address + nread; return(curp); } -- 2.39.5