--- busybox-1.7.1/findutils/grep.c	2007-10-26 18:29:01.000000000 -0200
+++ busybox-1.7.1-grep/findutils/grep.c	2007-10-26 18:29:09.000000000 -0200
@@ -162,9 +162,11 @@
 			gl = (grep_list_data_t *)pattern_ptr->data;
 			if (FGREP_FLAG) {
 				ret = strstr(line, gl->pattern) != NULL;
+				if (ret)
+					break;
 			} else {
 				/*
-				 * test for a postitive-assertion match (regexec returns success (0)
+				 * test for a positive-assertion match (regexec returns success (0)
 				 * and the user did not specify invert search), or a negative-assertion
 				 * match (regexec returns failure (REG_NOMATCH) and the user specified
 				 * invert search)
@@ -176,16 +178,19 @@
 				regmatch.rm_so = 0;
 				regmatch.rm_eo = 0;
 				if (regexec(&(gl->preg), line, 1, &regmatch, 0) == 0) {
-					if (!(option_mask32 & OPT_w))
+					if (!(option_mask32 & OPT_w)) {
 						ret = 1;
-					else {
+						break;
+					} else {
 						char c = ' ';
 						if (regmatch.rm_so)
 							c = line[regmatch.rm_so - 1];
 						if (!isalnum(c) && c != '_') {
 							c = line[regmatch.rm_eo];
-							if (!c || (!isalnum(c) && c != '_'))
+							if (!c || (!isalnum(c) && c != '_')) {
 								ret = 1;
+								break;
+							}
 						}
 					}
 				}
