* [patch] dont use obsolete index() function in lxdialog
@ 2007-03-17 6:37 Mike Frysinger
2007-03-17 6:51 ` Sam Ravnborg
0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2007-03-17 6:37 UTC (permalink / raw)
To: Andrew Morton, zippel; +Cc: linux-kernel
The index() function is obsolete, use strchr() instead.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
--- a/scripts/kconfig/lxdialog/util.c
+++ b/scripts/kconfig/lxdialog/util.c
@@ -336,7 +336,7 @@
newl = 1;
word = tempstr;
while (word && *word) {
- sp = index(word, ' ');
+ sp = strchr(word, ' ');
if (sp)
*sp++ = 0;
@@ -348,7 +348,7 @@
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-03-17 6:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-17 6:37 [patch] dont use obsolete index() function in lxdialog Mike Frysinger
2007-03-17 6:51 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox