mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-09-01 10:39:43 +02:00
txOutput.c: $PAGER handling constify
This commit is contained in:
+4
-3
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user