From 938b26cfaeaa7b1e7ba69d7d5985e63aefe0a0f4 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 25 Oct 2019 11:01:17 -0400 Subject: [PATCH] Don't use 'j' flag on %x. Remove an unnecessary cast. --- run.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run.c b/run.c index 96ed72c..b1294bd 100644 --- a/run.c +++ b/run.c @@ -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);