we're up to 133214 for MKSH_SMALL, as I missed a NULL pointer check

in the MKSH_SMALL case… so the speed, code size, and number of insns
is the same as before for that, except that the NULL pointer check is
moved to possibly save a function call, and that the function call may
be inlined or jumped
This commit is contained in:
tg 2008-07-12 18:24:58 +00:00
parent f47d20bc85
commit 04bc7ba51a
1 changed files with 2 additions and 2 deletions

4
misc.c
View File

@ -6,7 +6,7 @@
#include <grp.h>
#endif
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.83 2008/07/12 17:56:37 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.84 2008/07/12 18:24:58 tg Exp $");
#undef USE_CHVT
#if defined(TIOCSCTTY) && !defined(MKSH_SMALL)
@ -78,7 +78,7 @@ char *
str_save(const char *s, Area *ap)
{
#ifdef MKSH_SMALL
return (str_nsave(s, strlen(s), ap));
return (s ? str_nsave(s, strlen(s), ap) : NULL);
#else
char *rv = NULL;