]> git.wh0rd.org Git - patches.git/blob - linux-lxdialog-dont-use-index-func.patch
scummvm random work
[patches.git] / linux-lxdialog-dont-use-index-func.patch
1 The index() function is obsolete, use strchr() instead.
2
3 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
4
5 --- a/scripts/kconfig/lxdialog/util.c
6 +++ b/scripts/kconfig/lxdialog/util.c
7 @@ -336,7 +336,7 @@
8                 newl = 1;
9                 word = tempstr;
10                 while (word && *word) {
11 -                       sp = index(word, ' ');
12 +                       sp = strchr(word, ' ');
13                         if (sp)
14                                 *sp++ = 0;
15  
16 @@ -348,7 +348,7 @@
17                         if (wlen > room ||
18                             (newl && wlen < 4 && sp
19                              && wlen + 1 + strlen(sp) > room
20 -                            && (!(sp2 = index(sp, ' '))
21 +                            && (!(sp2 = strchr(sp, ' '))
22                                  || wlen + 1 + (sp2 - sp) > room))) {
23                                 cur_y++;
24                                 cur_x = x;