From f7d2debb981ac046a40cf531157cdf9c19b5ca3c Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Mon, 25 Aug 2025 11:32:21 +0100 Subject: [PATCH] txOutput.c: $PAGER handling constify --- textio/txOutput.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/textio/txOutput.c b/textio/txOutput.c index f4f2d1ee..62f37081 100644 --- a/textio/txOutput.c +++ b/textio/txOutput.c @@ -369,8 +369,9 @@ TxUseMore(void) if ((useenv = getenv("PAGER")) == NULL) { - pagerpath = (char *) mallocMagic((unsigned) (strlen(PAGERDIR) + 1)); - strcpy(pagerpath, PAGERDIR); + char *tmp = (char *) mallocMagic((unsigned) (strlen(PAGERDIR) + 1)); + strcpy(tmp, PAGERDIR); + pagerpath = tmp; } else pagerpath = useenv; @@ -418,7 +419,7 @@ TxUseMore(void) TxMoreFile = fdopen(pipeEnds[1], "w"); done: - if (useenv == NULL) freeMagic(pagerpath); + if (useenv == NULL) freeMagic((char*)pagerpath); return; }