Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/string simplify



details:   https://anonhg.NetBSD.org/src/rev/1afc301c6d18
branches:  trunk
changeset: 754056:1afc301c6d18
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Apr 18 04:54:33 2010 +0000

description:
simplify

diffstat:

 lib/libc/string/swab.c |  9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diffs (30 lines):

diff -r a764a26863b1 -r 1afc301c6d18 lib/libc/string/swab.c
--- a/lib/libc/string/swab.c    Sat Apr 17 22:05:53 2010 +0000
+++ b/lib/libc/string/swab.c    Sun Apr 18 04:54:33 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: swab.c,v 1.14 2010/04/17 21:42:43 christos Exp $       */
+/*     $NetBSD: swab.c,v 1.15 2010/04/18 04:54:33 christos Exp $       */
 
 /*
  * Copyright (c) 1988, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)swab.c     8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: swab.c,v 1.14 2010/04/17 21:42:43 christos Exp $");
+__RCSID("$NetBSD: swab.c,v 1.15 2010/04/18 04:54:33 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -51,10 +51,7 @@
        const char *fp;
        char *tp;
 
-       /*LINTED: unportable &*/
-       if (len & 1)
-               len--;
-       if (len <= 0)
+       if (len <= 1)
                return;
 
        _DIAGASSERT(from != NULL);



Home | Main Index | Thread Index | Old Index