diff options
Diffstat (limited to 'utility.c')
-rw-r--r-- | utility.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -777,7 +777,7 @@ int get_console_fd(char* tty_name) | |||
777 | #endif | 777 | #endif |
778 | 778 | ||
779 | 779 | ||
780 | #if !defined BB_REGEXP && (defined BB_GREP || defined BB_FIND ) | 780 | #if !defined BB_REGEXP && (defined BB_GREP || defined BB_FIND || defined BB_SED) |
781 | 781 | ||
782 | /* Do a case insensitive strstr() */ | 782 | /* Do a case insensitive strstr() */ |
783 | char* stristr(char *haystack, const char *needle) | 783 | char* stristr(char *haystack, const char *needle) |
@@ -817,7 +817,7 @@ extern int find_match(char *haystack, char *needle, int ignoreCase) | |||
817 | /* This performs substitutions after a string match has been found. */ | 817 | /* This performs substitutions after a string match has been found. */ |
818 | extern int replace_match(char *haystack, char *needle, char *newNeedle, int ignoreCase) | 818 | extern int replace_match(char *haystack, char *needle, char *newNeedle, int ignoreCase) |
819 | { | 819 | { |
820 | int foundOne; | 820 | int foundOne=0; |
821 | char *where, *slider, *slider1, *oldhayStack; | 821 | char *where, *slider, *slider1, *oldhayStack; |
822 | 822 | ||
823 | if (ignoreCase == FALSE) | 823 | if (ignoreCase == FALSE) |
@@ -847,7 +847,7 @@ extern int replace_match(char *haystack, char *needle, char *newNeedle, int igno | |||
847 | } | 847 | } |
848 | free( oldhayStack); | 848 | free( oldhayStack); |
849 | 849 | ||
850 | if (foundOne) | 850 | if (foundOne > 0) |
851 | return TRUE; | 851 | return TRUE; |
852 | else | 852 | else |
853 | return FALSE; | 853 | return FALSE; |