use ‘z’ shf printf modifier for out-of-memory message, now that we have it

This commit is contained in:
tg
2013-06-03 22:28:33 +00:00
parent 446fdbca3b
commit bb4083d649
5 changed files with 13 additions and 13 deletions

4
exec.c
View File

@ -23,7 +23,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.121 2013/06/02 03:09:14 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.122 2013/06/03 22:28:31 tg Exp $");
#ifndef MKSH_DEFAULT_EXECSHELL
#define MKSH_DEFAULT_EXECSHELL "/bin/sh"
@ -106,7 +106,7 @@ execute(struct op * volatile t,
/* set variable to its expanded value */
z = strlen(cp) + 1;
if (notoktomul(z, 2) || notoktoadd(z * 2, n))
internal_errorf(Toomem, (unsigned long)-1);
internal_errorf(Toomem, (size_t)-1);
dp = alloc(z * 2 + n, ATEMP);
memcpy(dp, t->vars[0], n);
t->vars[0] = dp;