Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/ekermit/dist Don't dereference pointers without...



details:   https://anonhg.NetBSD.org/src/rev/7680f69342ea
branches:  trunk
changeset: 331348:7680f69342ea
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Aug 08 23:43:10 2014 +0000

description:
Don't dereference pointers without looking at the result.

diffstat:

 external/bsd/ekermit/dist/main.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r adedaa68da41 -r 7680f69342ea external/bsd/ekermit/dist/main.c
--- a/external/bsd/ekermit/dist/main.c  Fri Aug 08 23:41:53 2014 +0000
+++ b/external/bsd/ekermit/dist/main.c  Fri Aug 08 23:43:10 2014 +0000
@@ -193,7 +193,7 @@
                  fatal("File '",s,"' not accessible");
                nfils++;
            }
-           xargc++, *xargv--;          /* Adjust argv/argc */
+           xargc++, xargv--;           /* Adjust argv/argc */
            if (nfils < 1)
              fatal("Missing filename for -s",(char *)0,(char *)0);
            action = A_SEND;
@@ -208,7 +208,7 @@
 #endif /* DEBUG */
            if (*(xp+1))
              fatal("Invalid argument bundling",(char *)0,(char *)0);
-           *xargv++, xargc--;
+           xargv++, xargc--;
            if ((xargc < 1) || (**xargv == '-'))
              fatal("Missing option argument",(char *)0,(char *)0);
            s = *xargv;
@@ -259,7 +259,7 @@
          case 'p':                     /* Parity */
            if (*(xp+1))
              fatal("Invalid argument bundling",(char *)0,(char *)0);
-           *xargv++, xargc--;
+           xargv++, xargc--;
            if ((xargc < 1) || (**xargv == '-'))
              fatal("Missing parity",(char *)0,(char *)0);
            switch(x = **xargv) {



Home | Main Index | Thread Index | Old Index