summaryrefslogtreecommitdiffstats
path: root/text-utils
diff options
context:
space:
mode:
authorKarel Zak2007-01-17 14:27:15 +0100
committerKarel Zak2007-01-17 14:27:15 +0100
commit42c9ce52aaf4d5a060ac435a9a988005a8e0807a (patch)
tree5504897fd76d68370324a0668150faca43302273 /text-utils
parentschedutils: add support for SCHED_BATCH (diff)
downloadkernel-qcow2-util-linux-42c9ce52aaf4d5a060ac435a9a988005a8e0807a.tar.gz
kernel-qcow2-util-linux-42c9ce52aaf4d5a060ac435a9a988005a8e0807a.tar.xz
kernel-qcow2-util-linux-42c9ce52aaf4d5a060ac435a9a988005a8e0807a.zip
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 25d7f043a..3d4bdcd98 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);
}