From: Mike Frysinger Date: Sat, 17 Mar 2007 06:29:05 +0000 (-0000) Subject: dont use obsolete function index() as pointed out by src.obsolete.funcs X-Git-Tag: 1_5_1~36 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7a96504d30e0bcafb5e014555c741fea6513172a;p=oweals%2Fbusybox.git dont use obsolete function index() as pointed out by src.obsolete.funcs --- diff --git a/scripts/kconfig/lxdialog/util.c b/scripts/kconfig/lxdialog/util.c index f82cebb9f..072d3eecc 100644 --- a/scripts/kconfig/lxdialog/util.c +++ b/scripts/kconfig/lxdialog/util.c @@ -224,7 +224,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; @@ -236,7 +236,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;