On Sat, May 28, 2011 at 11:42:37PM +0100, Julio M. Merino Vidal wrote: > On 5/28/11 10:46 PM, Christos Zoulas wrote: > >In article<20110528161256.ab89817...@cvs.netbsd.org>, > >Matthias Scheler<source-changes-d@NetBSD.org> wrote: > >>+ assert(pipe(fds) == 0); > >[...] > >>+ assert(write(fds[1], "", 1) == 1); > >[...] > >>+ assert(close(fds[0]) == 0); > >>+ assert(close(fds[1]) == 0); > >[...] > >>+ assert(sigfillset(&mask) == 0); > >[...] > >>+ assert(sigprocmask(SIG_SETMASK, NULL,&mask) == 0); > >[...] > >>+ assert(close(fd) == 0); > > > >Please don't create assertions that contain code, because compiled with > >-DNDEBUG they vanish. > > Are these test code? If so, just replace assert by one of: > > - ATF_REQUIRE(boolean_expression) > - ATF_REQUIRE_EQ(expected_value, actual_value) > > like: > > ATF_REQUIRE(pipe(fds) != 0); > ATF_REQUIRE_EQ(1, write(fds[1], "", 1));
I've fixed it as suggested by you. Kind regards -- Matthias Scheler http://zhadum.org.uk/