Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/error PR 51298 David Binderman: simplify redundant c...



details:   https://anonhg.NetBSD.org/src/rev/50f5d8bbb8ab
branches:  trunk
changeset: 346188:50f5d8bbb8ab
user:      dholland <dholland%NetBSD.org@localhost>
date:      Thu Jun 30 15:34:30 2016 +0000

description:
PR 51298 David Binderman: simplify redundant conditionals

diffstat:

 usr.bin/error/pi.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r e7840e824471 -r 50f5d8bbb8ab usr.bin/error/pi.c
--- a/usr.bin/error/pi.c        Thu Jun 30 15:29:20 2016 +0000
+++ b/usr.bin/error/pi.c        Thu Jun 30 15:34:30 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pi.c,v 1.18 2011/08/17 13:11:22 christos Exp $ */
+/*     $NetBSD: pi.c,v 1.19 2016/06/30 15:34:30 dholland Exp $ */
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)pi.c       8.1 (Berkeley) 6/6/93";
 #endif
-__RCSID("$NetBSD: pi.c,v 1.18 2011/08/17 13:11:22 christos Exp $");
+__RCSID("$NetBSD: pi.c,v 1.19 2016/06/30 15:34:30 dholland Exp $");
 #endif /* not lint */
 
 #include <stdio.h>
@@ -218,12 +218,12 @@
 {
        if (*string != '-')
                return false;
-       while (*string && *string == '-')
+       while (*string == '-')
                string++;
        if (*string != '^')
                return false;
        string++;
-       while (*string && *string == '-')
+       while (*string == '-')
                string++;
        return (*string == '\0');
 }



Home | Main Index | Thread Index | Old Index