save 176 text (92 text 32 bss relative to before last commit)
by making correct use of shf_* functions
This commit is contained in:
9
eval.c
9
eval.c
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.14 2006/11/09 23:55:51 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.15 2006/11/10 00:09:27 tg Exp $");
|
||||
|
||||
/*
|
||||
* string expansion
|
||||
@@ -717,12 +717,7 @@ varsub(Expand *xp, char *sp, char *word,
|
||||
if (Flag(FNOUNSET) && c == 0 && !zero_ok)
|
||||
errorf("%s: parameter not set", sp);
|
||||
*stypep = 0; /* unqualified variable/string substitution */
|
||||
{
|
||||
char tmpbuf[11];
|
||||
|
||||
shf_snprintf(tmpbuf, 11, "%lu", (unsigned long)c);
|
||||
xp->str = str_save(tmpbuf, ATEMP);
|
||||
}
|
||||
xp->str = shf_smprintf("%lu", (unsigned long)c);
|
||||
return XSUB;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user