projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed option parsing. Grep would continue grepping, even when given a bad /
[oweals/busybox.git]
/
echo.c
diff --git
a/echo.c
b/echo.c
index e9bc50a15281f7a4dc4e04e997021e36df4b4516..31c0315289790aad1840a324e048d494302186be 100644
(file)
--- a/
echo.c
+++ b/
echo.c
@@
-40,7
+40,7
@@
echo_main(int argc, char** argv)
while (argc > 0 && *argv[0] == '-')
{
register char *temp;
while (argc > 0 && *argv[0] == '-')
{
register char *temp;
- register int i
nde
x;
+ register int ix;
/*
* If it appears that we are handling options, then make sure
/*
* If it appears that we are handling options, then make sure
@@
-49,9
+49,9
@@
echo_main(int argc, char** argv)
*/
temp = argv[0] + 1;
*/
temp = argv[0] + 1;
- for (i
ndex = 0; temp[index]; inde
x++)
+ for (i
x = 0; temp[ix]; i
x++)
{
{
- if (strrchr("neE", temp[i
nde
x]) == 0)
+ if (strrchr("neE", temp[ix]) == 0)
goto just_echo;
}
goto just_echo;
}
@@
-81,7
+81,7
@@
echo_main(int argc, char** argv)
just_echo:
while (argc > 0) {
just_echo:
while (argc > 0) {
- char *arg = argv[0];
+ c
onst c
har *arg = argv[0];
register int c;
while ((c = *arg++)) {
register int c;
while ((c = *arg++)) {