Source-Changes-HG archive

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

[src/trunk]: src Fix violations of the sequence point rule.



details:   https://anonhg.NetBSD.org/src/rev/21da68ba3cc9
branches:  trunk
changeset: 787690:21da68ba3cc9
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Jun 28 15:04:35 2013 +0000

description:
Fix violations of the sequence point rule.

diffstat:

 bin/ed/re.c                                            |  6 +++---
 crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c |  6 +++---
 crypto/external/bsd/libsaslc/dist/src/xsess.c          |  6 +++---
 libexec/ftpd/cmds.c                                    |  6 +++---
 usr.bin/sed/compile.c                                  |  6 +++---
 usr.sbin/moused/moused.c                               |  6 +++---
 6 files changed, 18 insertions(+), 18 deletions(-)

diffs (162 lines):

diff -r 15bd4b023e42 -r 21da68ba3cc9 bin/ed/re.c
--- a/bin/ed/re.c       Fri Jun 28 14:49:14 2013 +0000
+++ b/bin/ed/re.c       Fri Jun 28 15:04:35 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: re.c,v 1.19 2005/02/17 16:29:26 xtraeme Exp $  */
+/*     $NetBSD: re.c,v 1.20 2013/06/28 15:04:35 joerg Exp $    */
 
 /* re.c: This file contains the regular expression interface routines for
    the ed line editor. */
@@ -33,7 +33,7 @@
 #if 0
 static char *rcsid = "@(#)re.c,v 1.6 1994/02/01 00:34:43 alm Exp";
 #else
-__RCSID("$NetBSD: re.c,v 1.19 2005/02/17 16:29:26 xtraeme Exp $");
+__RCSID("$NetBSD: re.c,v 1.20 2013/06/28 15:04:35 joerg Exp $");
 #endif
 #endif /* not lint */
 
@@ -95,7 +95,7 @@
                default:
                        break;
                case '[':
-                       if ((nd = parse_char_class(++nd)) == NULL) {
+                       if ((nd = parse_char_class(nd + 1)) == NULL) {
                                sprintf(errmsg, "unbalanced brackets ([])");
                                return NULL;
                        }
diff -r 15bd4b023e42 -r 21da68ba3cc9 crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c
--- a/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c    Fri Jun 28 14:49:14 2013 +0000
+++ b/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c    Fri Jun 28 15:04:35 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mech_digestmd5.c,v 1.10 2011/02/20 01:59:46 christos Exp $ */
+/* $NetBSD: mech_digestmd5.c,v 1.11 2013/06/28 15:04:35 joerg Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: mech_digestmd5.c,v 1.10 2011/02/20 01:59:46 christos Exp $");
+__RCSID("$NetBSD: mech_digestmd5.c,v 1.11 2013/06/28 15:04:35 joerg Exp $");
 
 #include <sys/param.h>
 
@@ -1626,7 +1626,7 @@
                if (val == NULL)
                        goto no_mem;
                *val = '\0';
-               val = strip_quotes(++val);
+               val = strip_quotes(val + 1);
 
                saslc__msg_dbg("key='%s' val='%s'\n", key, val);
                switch (get_challenge_t(key)) {
diff -r 15bd4b023e42 -r 21da68ba3cc9 crypto/external/bsd/libsaslc/dist/src/xsess.c
--- a/crypto/external/bsd/libsaslc/dist/src/xsess.c     Fri Jun 28 14:49:14 2013 +0000
+++ b/crypto/external/bsd/libsaslc/dist/src/xsess.c     Fri Jun 28 15:04:35 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xsess.c,v 1.6 2011/02/20 01:59:46 christos Exp $ */
+/* $NetBSD: xsess.c,v 1.7 2013/06/28 15:04:35 joerg Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: xsess.c,v 1.6 2011/02/20 01:59:46 christos Exp $");
+__RCSID("$NetBSD: xsess.c,v 1.7 2013/06/28 15:04:35 joerg Exp $");
 
 #include <assert.h>
 #include <saslc.h>
@@ -91,7 +91,7 @@
                        break;
                if (p > opts && p[-1] != ',')
                        *p++ = ',';
-               p = skip_WS(++p);
+               p = skip_WS(p + 1);
        }
 }
 
diff -r 15bd4b023e42 -r 21da68ba3cc9 libexec/ftpd/cmds.c
--- a/libexec/ftpd/cmds.c       Fri Jun 28 14:49:14 2013 +0000
+++ b/libexec/ftpd/cmds.c       Fri Jun 28 15:04:35 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cmds.c,v 1.31 2012/06/19 06:06:34 dholland Exp $       */
+/*     $NetBSD: cmds.c,v 1.32 2013/06/28 15:04:35 joerg Exp $  */
 
 /*
  * Copyright (c) 1999-2009 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: cmds.c,v 1.31 2012/06/19 06:06:34 dholland Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.32 2013/06/28 15:04:35 joerg Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -878,7 +878,7 @@
                cp = tp;
                nomorelink = 1;
                
-               while ((cp = strstr(++cp, "/")) != NULL) {
+               while ((cp = strstr(cp + 1, "/")) != NULL) {
                        sz1 = (unsigned long)cp - (unsigned long)tp;
                        if (sz1 > MAXPATHLEN)
                                goto bad;
diff -r 15bd4b023e42 -r 21da68ba3cc9 usr.bin/sed/compile.c
--- a/usr.bin/sed/compile.c     Fri Jun 28 14:49:14 2013 +0000
+++ b/usr.bin/sed/compile.c     Fri Jun 28 15:04:35 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compile.c,v 1.38 2012/12/14 08:16:51 msaitoh Exp $     */
+/*     $NetBSD: compile.c,v 1.39 2013/06/28 15:04:35 joerg Exp $       */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -76,7 +76,7 @@
 #if 0
 static char sccsid[] = "@(#)compile.c  8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: compile.c,v 1.38 2012/12/14 08:16:51 msaitoh Exp $");
+__RCSID("$NetBSD: compile.c,v 1.39 2013/06/28 15:04:35 joerg Exp $");
 #endif
 #endif /* not lint */
 
@@ -657,7 +657,7 @@
                goto bad;
        }
        new = xmalloc(strlen(p) + 1);
-       p = compile_delimited(--p, new);
+       p = compile_delimited(p - 1, new);
        if (p == NULL) {
                err(COMPILE, "unterminated transform target string");
                goto bad;
diff -r 15bd4b023e42 -r 21da68ba3cc9 usr.sbin/moused/moused.c
--- a/usr.sbin/moused/moused.c  Fri Jun 28 14:49:14 2013 +0000
+++ b/usr.sbin/moused/moused.c  Fri Jun 28 15:04:35 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: moused.c,v 1.22 2011/08/31 16:32:48 christos Exp $ */
+/* $NetBSD: moused.c,v 1.23 2013/06/28 15:04:35 joerg Exp $ */
 /**
  ** Copyright (c) 1995 Michael Smith, All rights reserved.
  **
@@ -48,7 +48,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: moused.c,v 1.22 2011/08/31 16:32:48 christos Exp $");
+__RCSID("$NetBSD: moused.c,v 1.23 2013/06/28 15:04:35 joerg Exp $");
 #endif /* not lint */
 
 #include <ctype.h>
@@ -2045,7 +2045,7 @@
            return FALSE;
        lbutton = atoi(s);
 
-       arg = skipspace(++arg);
+       arg = skipspace(arg + 1);
        s = arg;
        while (isdigit((unsigned char)*arg))
            ++arg;



Home | Main Index | Thread Index | Old Index