hush: trivial code shrink

function                                             old     new   delta
static_get                                            26      22      -4

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2010-05-22 17:50:43 +02:00
parent 2e48d536ce
commit 8391c4800c

View File

@ -1607,10 +1607,11 @@ static struct variable *set_vars_and_save_old(char **strings)
*/
static int FAST_FUNC static_get(struct in_str *i)
{
int ch = *i->p++;
if (ch != '\0')
int ch = *i->p;
if (ch != '\0') {
i->p++;
return ch;
i->p--;
}
return EOF;
}
@ -2221,7 +2222,7 @@ static int o_glob(o_string *o, int n)
return n;
}
#else
#else /* !HUSH_BRACE_EXP */
/* Helper */
static int glob_needed(const char *s)
@ -2298,7 +2299,7 @@ static int o_glob(o_string *o, int n)
return n;
}
#endif
#endif /* !HUSH_BRACE_EXP */
/* If o->o_glob == 1, glob the string so far remembered.
* Otherwise, just finish current list[] and start new */