summaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
authorEric Andersen1999-10-29 23:09:13 +0000
committerEric Andersen1999-10-29 23:09:13 +0000
commit7f1acfdb8928de69bf02db6cf217f0f3b4af45ea (patch)
tree752654d9a3ef967d5409600962e31bea5cae14fc /utility.c
parent24d8e7d787aa1940030a1beaabdd4388588ca512 (diff)
downloadbusybox-7f1acfdb8928de69bf02db6cf217f0f3b4af45ea.zip
busybox-7f1acfdb8928de69bf02db6cf217f0f3b4af45ea.tar.gz
More stuf. sed works.
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/utility.c b/utility.c
index e0f9d12..6373687 100644
--- a/utility.c
+++ b/utility.c
@@ -777,7 +777,7 @@ int get_console_fd(char* tty_name)
#endif
-#if !defined BB_REGEXP && (defined BB_GREP || defined BB_FIND )
+#if !defined BB_REGEXP && (defined BB_GREP || defined BB_FIND || defined BB_SED)
/* Do a case insensitive strstr() */
char* stristr(char *haystack, const char *needle)
@@ -817,7 +817,7 @@ extern int find_match(char *haystack, char *needle, int ignoreCase)
/* This performs substitutions after a string match has been found. */
extern int replace_match(char *haystack, char *needle, char *newNeedle, int ignoreCase)
{
- int foundOne;
+ int foundOne=0;
char *where, *slider, *slider1, *oldhayStack;
if (ignoreCase == FALSE)
@@ -847,7 +847,7 @@ extern int replace_match(char *haystack, char *needle, char *newNeedle, int igno
}
free( oldhayStack);
- if (foundOne)
+ if (foundOne > 0)
return TRUE;
else
return FALSE;