summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2017-10-19 17:52:31 +0200
committerJeremy Allison <jra@samba.org>2017-10-27 20:33:25 +0200
commit7e4908d72b4e3bd662bdc2da18e8b5272c15c13e (patch)
treebf61263bed7edc31adc65ae3ec84c36558e3d2a6 /lib
parentdea1881fc5e53b5d1750c16b4d7f7d0ddd971875 (diff)
downloadsamba-7e4908d72b4e3bd662bdc2da18e8b5272c15c13e.tar.gz
lib: Use all_zero where appropriate
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/util/util.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/util/util.c b/lib/util/util.c
index ef148e98d29..4291bfa5d57 100644
--- a/lib/util/util.c
+++ b/lib/util/util.c
@@ -434,7 +434,6 @@ void dump_data_cb(const uint8_t *buf, int len,
void *private_data)
{
int i=0;
- static const uint8_t empty[16] = { 0, };
bool skipped = false;
char tmp[16];
@@ -446,7 +445,7 @@ void dump_data_cb(const uint8_t *buf, int len,
if ((omit_zero_bytes == true) &&
(i > 0) &&
(len > i+16) &&
- (memcmp(&buf[i], &empty, 16) == 0))
+ all_zero(&buf[i], 16))
{
i +=16;
continue;
@@ -473,7 +472,7 @@ void dump_data_cb(const uint8_t *buf, int len,
if ((omit_zero_bytes == true) &&
(len > i+16) &&
- (memcmp(&buf[i], &empty, 16) == 0)) {
+ all_zero(&buf[i], 16)) {
if (!skipped) {
cb("skipping zero buffer bytes\n",
private_data);