mirror of
https://github.com/sheumann/hush.git
synced 2024-08-26 12:29:04 +00:00
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:
parent
2e48d536ce
commit
8391c4800c
11
shell/hush.c
11
shell/hush.c
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user