diff options
author | Karel Zak <kzak@redhat.com> | 2007-01-17 14:27:15 +0100 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2007-01-17 14:27:15 +0100 |
commit | 42c9ce52aaf4d5a060ac435a9a988005a8e0807a (patch) | |
tree | 5504897fd76d68370324a0668150faca43302273 | |
parent | df3773fba068c88ec4ce2d3b65dec57146d2b730 (diff) | |
download | util-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>
-rw-r--r-- | text-utils/display.c | 3 |
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); } |