X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Fzero.c;h=67112d83825fd738ba4f31226bc4a7a053674a89;hb=7d3848ddc046f79cc1112809bd9970eea8060018;hp=c9f6bf7f37e664ca168967aef0c9ffeee752da94;hpb=5a50c04906828f6e99db6a9be420c84114476d39;p=libguestfs.git diff --git a/daemon/zero.c b/daemon/zero.c index c9f6bf7..67112d8 100644 --- a/daemon/zero.c +++ b/daemon/zero.c @@ -13,7 +13,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include @@ -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