Module Name:    src
Committed By:   christos
Date:           Thu Dec 13 19:33:24 UTC 2012

Modified Files:
        src/bin/sh: var.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/bin/sh/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/sh/var.c
diff -u src/bin/sh/var.c:1.41 src/bin/sh/var.c:1.42
--- src/bin/sh/var.c:1.41	Wed Mar 28 16:11:25 2012
+++ src/bin/sh/var.c	Thu Dec 13 14:33:23 2012
@@ -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 @@ print_quoted(const char *p)
 			p++;
 			continue;
 		}
-		q = index(p, '\'');
+		q = strchr(p, '\'');
 		if (!q) {
 			out1fmt("'%s'", p );
 			return;

Reply via email to