From owner-cvs-all@FreeBSD.ORG Tue Jun 3 04:54:43 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D88F737B401; Tue, 3 Jun 2003 04:54:43 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C68443FBD; Tue, 3 Jun 2003 04:54:43 -0700 (PDT) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h53Bsh0U071847; Tue, 3 Jun 2003 04:54:43 -0700 (PDT) (envelope-from bde@repoman.freebsd.org) Received: (from bde@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h53Bsh1x071846; Tue, 3 Jun 2003 04:54:43 -0700 (PDT) Message-Id: <200306031154.h53Bsh1x071846@repoman.freebsd.org> From: Bruce Evans Date: Tue, 3 Jun 2003 04:54:43 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/bin/df df.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2003 11:54:44 -0000 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