Date: Tue, 3 Jun 2003 04:54:43 -0700 (PDT) From: Bruce Evans <bde@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/bin/df df.c Message-ID: <200306031154.h53Bsh1x071846@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
bde 2003/06/03 04:54:43 PDT FreeBSD src repository Modified files: bin/df df.c Log: Fixed exit code in previous commit. "var++" to set a flag to nonzero is a style bug at best. When the variable isn't a flag, it potentially overflows after a large number of settings. Here the number of settings is limited by ARG_MAX, but the variable is the exit code so it became bogus after the second setting and effectively overflowed to 0 after approx. 128 settings. Fixed some style bugs involving comments in and near previous commit. Clarification of previous commit message: df -t didn't give undefined behaviour, and the behaviour used to conform perfectly with the man page, since the buggy behaviour is documented in the BUGS section. -t just worked when no files or file systems were specified, and was just ignored if a file or file system was specified. Revision Changes Path 1.50 +9 -5 src/bin/df/df.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200306031154.h53Bsh1x071846>