X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Fzero.c;h=8df2298c2459bfa1de2937f2e66a08f025b20234;hp=c9f6bf7f37e664ca168967aef0c9ffeee752da94;hb=19005b2cfc6b077aafd16cb5b97a08180e4e39f8;hpb=5a50c04906828f6e99db6a9be420c84114476d39 diff --git a/daemon/zero.c b/daemon/zero.c index c9f6bf7..8df2298 100644 --- a/daemon/zero.c +++ b/daemon/zero.c @@ -28,24 +28,6 @@ #include "daemon.h" #include "actions.h" -/* Return true iff the buffer is all zero bytes. - * - * Note that gcc is smart enough to optimize this properly: - * http://stackoverflow.com/questions/1493936/faster-means-of-checking-for-an-empty-buffer-in-c/1493989#1493989 - */ -static int -is_zero (const char *buffer, size_t size) -{ - size_t i; - - for (i = 0; i < size; ++i) { - if (buffer[i] != 0) - return 0; - } - - return 1; -} - static const char zero_buf[4096]; int