summaryrefslogtreecommitdiff
path: root/text-utils
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2007-01-17 14:27:15 +0100
committerKarel Zak <kzak@redhat.com>2007-01-17 14:27:15 +0100
commit42c9ce52aaf4d5a060ac435a9a988005a8e0807a (patch)
tree5504897fd76d68370324a0668150faca43302273 /text-utils
parentdf3773fba068c88ec4ce2d3b65dec57146d2b730 (diff)
downloadutil-linux-old-42c9ce52aaf4d5a060ac435a9a988005a8e0807a.tar.gz
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 <kzak@redhat.com>
Diffstat (limited to 'text-utils')
-rw-r--r--text-utils/display.c3
1 files changed, 2 insertions, 1 deletions
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);
}