From: Jim Meyering Date: Tue, 1 Nov 1994 22:21:23 +0000 (+0000) Subject: (XWRITE): Allow n_bytes to be zero in assertion. Otherwise `tail /dev/null' X-Git-Tag: textutils-1_12_1~484 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7a5462a0b71b8b6bfe5f71cad341f2a149aa0535;p=thirdparty%2Fcoreutils.git (XWRITE): Allow n_bytes to be zero in assertion. Otherwise `tail /dev/null' gets failed assertion. --- diff --git a/src/tail.c b/src/tail.c index 87983253c0..138f93a0c4 100644 --- a/src/tail.c +++ b/src/tail.c @@ -54,14 +54,14 @@ #include "system.h" #include "version.h" -/* FIXME: uncomment before release. */ -/* #define NDEBUG 1 */ +/* Disable assertions. Some systems have broken assert macros. */ +#define NDEBUG 1 #define XWRITE(fd, buffer, n_bytes) \ do \ { \ assert ((fd) == 1); \ - assert ((n_bytes) > 0); \ + assert ((n_bytes) >= 0); \ if (fwrite ((buffer), 1, (n_bytes), stdout) == 0) \ error (1, errno, "write error"); \ } \