]> git.wh0rd.org - patches.git/blame - linux-lxdialog-dont-use-index-func.patch
more random patches. who knows.
[patches.git] / linux-lxdialog-dont-use-index-func.patch
CommitLineData
5e993f12 1The index() function is obsolete, use strchr() instead.
2
3Signed-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;