save 176 text (92 text 32 bss relative to before last commit)

by making correct use of shf_* functions
This commit is contained in:
tg
2006-11-10 00:09:27 +00:00
parent 320f503391
commit c2aec39358
2 changed files with 11 additions and 26 deletions

9
eval.c
View File

@@ -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;
}