Source-Changes-HG archive

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

[src/trunk]: src/bin/sh PR/47317: Henning Petersen: Replace index() with strc...



details:   https://anonhg.NetBSD.org/src/rev/290089852472
branches:  trunk
changeset: 783291:290089852472
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Dec 13 19:33:23 2012 +0000

description:
PR/47317: Henning Petersen: Replace index() with strchr()

diffstat:

 bin/sh/var.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 6b002beef918 -r 290089852472 bin/sh/var.c
--- a/bin/sh/var.c      Thu Dec 13 19:31:25 2012 +0000
+++ b/bin/sh/var.c      Thu Dec 13 19:33:23 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.41 2012/03/28 20:11:25 christos Exp $        */
+/*     $NetBSD: var.c,v 1.42 2012/12/13 19:33:23 christos Exp $        */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,13 +37,13 @@
 #if 0
 static char sccsid[] = "@(#)var.c      8.3 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: var.c,v 1.41 2012/03/28 20:11:25 christos Exp $");
+__RCSID("$NetBSD: var.c,v 1.42 2012/12/13 19:33:23 christos Exp $");
 #endif
 #endif /* not lint */
 
 #include <unistd.h>
 #include <stdlib.h>
-#include <strings.h>
+#include <string.h>
 #include <paths.h>
 #include <limits.h>
 
@@ -486,7 +486,7 @@
                        p++;
                        continue;
                }
-               q = index(p, '\'');
+               q = strchr(p, '\'');
                if (!q) {
                        out1fmt("'%s'", p );
                        return;



Home | Main Index | Thread Index | Old Index