txOutput.c: $PAGER handling constify

This commit is contained in:
Darryl L. Miles
2025-10-04 20:50:31 -04:00
committed by R. Timothy Edwards
parent 0f047b89ce
commit f7d2debb98
+4 -3
View File
@@ -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;
}