From: Volker Lendecke Date: Thu, 19 Oct 2017 15:52:31 +0000 (+0200) Subject: lib: Use all_zero where appropriate X-Git-Tag: tevent-0.9.34~76 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7e4908d72b4e3bd662bdc2da18e8b5272c15c13e;p=thirdparty%2Fsamba.git lib: Use all_zero where appropriate Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- 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);