]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
menuconfig: dont use obsolete index() function in lxdialog
authorMike Frysinger <vapier@gentoo.org>
Sat, 17 Mar 2007 06:37:07 +0000 (02:37 -0400)
committerSam Ravnborg <sam@ravnborg.org>
Wed, 2 May 2007 18:58:08 +0000 (20:58 +0200)
The index() function is obsolete, use strchr() instead.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
scripts/kconfig/lxdialog/util.c

index d54440fc166cbd03bc8c16c9c91667fd9631761e..a1a1354ba2382602b563c43ee30fb6c94ec100f5 100644 (file)
@@ -336,7 +336,7 @@ void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x)
                newl = 1;
                word = tempstr;
                while (word && *word) {
-                       sp = index(word, ' ');
+                       sp = strchr(word, ' ');
                        if (sp)
                                *sp++ = 0;
 
@@ -348,7 +348,7 @@ void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x)
                        if (wlen > room ||
                            (newl && wlen < 4 && sp
                             && wlen + 1 + strlen(sp) > room
-                            && (!(sp2 = index(sp, ' '))
+                            && (!(sp2 = strchr(sp, ' '))
                                 || wlen + 1 + (sp2 - sp) > room))) {
                                cur_y++;
                                cur_x = x;