txOutput.c: $PAGER handling constify
This commit is contained in:
parent
a9cb247153
commit
341581d3f0
|
|
@ -369,8 +369,9 @@ TxUseMore(void)
|
||||||
|
|
||||||
if ((useenv = getenv("PAGER")) == NULL)
|
if ((useenv = getenv("PAGER")) == NULL)
|
||||||
{
|
{
|
||||||
pagerpath = (char *) mallocMagic((unsigned) (strlen(PAGERDIR) + 1));
|
char *tmp = (char *) mallocMagic((unsigned) (strlen(PAGERDIR) + 1));
|
||||||
strcpy(pagerpath, PAGERDIR);
|
strcpy(tmp, PAGERDIR);
|
||||||
|
pagerpath = tmp;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
pagerpath = useenv;
|
pagerpath = useenv;
|
||||||
|
|
@ -418,7 +419,7 @@ TxUseMore(void)
|
||||||
TxMoreFile = fdopen(pipeEnds[1], "w");
|
TxMoreFile = fdopen(pipeEnds[1], "w");
|
||||||
|
|
||||||
done:
|
done:
|
||||||
if (useenv == NULL) freeMagic(pagerpath);
|
if (useenv == NULL) freeMagic((char*)pagerpath);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue