This doesn't change any behavior, but may be a slight

optimization.  (num-- > 0) --> (--num >= 0).

Obtained from: NetBSD
This commit is contained in:
steve 1996-12-21 15:16:32 +00:00
parent 2cc8692b2c
commit 705d04d9c4

View File

@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: expand.c,v 1.11 1996/10/31 07:15:54 ache Exp $
* $Id: expand.c,v 1.12 1996/12/14 06:19:16 steve Exp $
*/
#ifndef lint
@ -719,7 +719,7 @@ varisset(name)
} else if (is_digit(*name)) {
int num = atoi(name);
ap = shellparam.p;
while (num-- > 0)
while (--num >= 0)
if (*ap++ == NULL)
return 0;
}