diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-03-17 02:37:07 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2007-05-02 20:58:08 +0200 |
commit | f88d205501e35195444bdd41983e26546af3f56a (patch) | |
tree | c59cd489abcc87128b74bb9163a3a568251a02e1 | |
parent | 2462566f21a5ecdb2a7e75e09db90ff175b1f748 (diff) | |
download | linux-f88d205501e35195444bdd41983e26546af3f56a.tar.gz linux-f88d205501e35195444bdd41983e26546af3f56a.tar.bz2 linux-f88d205501e35195444bdd41983e26546af3f56a.zip |
menuconfig: dont use obsolete index() function in lxdialog
The index() function is obsolete, use strchr() instead.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
-rw-r--r-- | scripts/kconfig/lxdialog/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/kconfig/lxdialog/util.c b/scripts/kconfig/lxdialog/util.c index d54440fc166c..a1a1354ba238 100644 --- a/scripts/kconfig/lxdialog/util.c +++ b/scripts/kconfig/lxdialog/util.c @@ -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; |