Don't use 'j' flag on %x. Remove an unnecessary cast.

This commit is contained in:
Arnold D. Robbins 2019-10-25 11:01:17 -04:00
parent 0d8778bbbb
commit 938b26cfae
1 changed files with 2 additions and 2 deletions

4
run.c
View File

@ -898,7 +898,7 @@ int format(char **pbuf, int *pbufsize, const char *s, Node *a) /* printf-like co
break;
case 'o': case 'x': case 'X': case 'u':
flag = *(s-1) == 'l' ? 'd' : 'u';
*(t-1) = 'j';
*(t-1) = 'l';
*t = *s;
*++t = '\0';
break;
@ -1827,7 +1827,7 @@ Cell *sub(Node **a, int nnn) /* substitute command */
fa *pfa;
int bufsz = recsize;
if ((buf = (char *) malloc(bufsz)) == NULL)
if ((buf = malloc(bufsz)) == NULL)
FATAL("out of memory in sub");
x = execute(a[3]); /* target string */
t = getsval(x);