We just need to increment count in the NUL case, nothing more. - todd
Index: usr.bin/xargs/xargs.c =================================================================== RCS file: /cvs/src/usr.bin/xargs/xargs.c,v retrieving revision 1.31 diff -u -p -u -r1.31 xargs.c --- usr.bin/xargs/xargs.c 9 Dec 2015 19:29:49 -0000 1.31 +++ usr.bin/xargs/xargs.c 16 Jan 2017 16:08:23 -0000 @@ -278,8 +278,10 @@ parse_input(int argc, char *argv[]) } goto arg1; case '\0': - if (zflag) + if (zflag) { + count++; goto arg2; + } goto addch; case '\n': hasblank = 1;