Skip to content

Commit

Permalink
menuconfig: dont use obsolete index() function in lxdialog
Browse files Browse the repository at this point in the history
The index() function is obsolete, use strchr() instead.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
  • Loading branch information
Mike Frysinger authored and Sam Ravnborg committed May 2, 2007
1 parent 2462566 commit f88d205
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/kconfig/lxdialog/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down

0 comments on commit f88d205

Please sign in to comment.