summaryrefslogtreecommitdiff
path: root/extra/config/lxdialog/util.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-09-15 00:26:11 +0000
committerMike Frysinger <vapier@gentoo.org>2007-09-15 00:26:11 +0000
commit4c8bdd2e7a8ef8e3c3f0c5ffd3aabdb354471acf (patch)
tree29805dd57cdcd7ae9a5ea9403c5d86a5326b0480 /extra/config/lxdialog/util.c
parent1007c6844bc5e041f91dceb08f6c688aacf16306 (diff)
fix from Kevin Day to make sure we use strchr() rather than index()
Diffstat (limited to 'extra/config/lxdialog/util.c')
-rw-r--r--extra/config/lxdialog/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/extra/config/lxdialog/util.c b/extra/config/lxdialog/util.c
index d54440fc1..a1a1354ba 100644
--- a/extra/config/lxdialog/util.c
+++ b/extra/config/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;