diff options
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/mendexk/fwrite.c | 4 | ||||
-rw-r--r-- | Build/source/texk/mendexk/main.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Build/source/texk/mendexk/fwrite.c b/Build/source/texk/mendexk/fwrite.c index 66dd1fcfba0..ee5fee0b8e3 100644 --- a/Build/source/texk/mendexk/fwrite.c +++ b/Build/source/texk/mendexk/fwrite.c @@ -124,7 +124,7 @@ void indwrite(char *filename, struct index *ind, int pagenum) FILE *fp; int conv_euc_to_euc; - if (filename[0]!='\0' && kpse_out_name_ok(filename)) fp=fopen(filename,"wb"); + if (filename && kpse_out_name_ok(filename)) fp=fopen(filename,"wb"); else { fp=stdout; #ifdef WIN32 @@ -303,7 +303,7 @@ void indwrite(char *filename, struct index *ind, int pagenum) } fputs(postamble,fp); - if (filename[0]!='\0') fclose(fp); + if (filename) fclose(fp); } /* write page block */ diff --git a/Build/source/texk/mendexk/main.c b/Build/source/texk/mendexk/main.c index 3790a79b0cd..739b449d9f6 100644 --- a/Build/source/texk/mendexk/main.c +++ b/Build/source/texk/mendexk/main.c @@ -278,11 +278,11 @@ int main(int argc, char **argv) } if (i==-1) sprintf(logfile,"%s.ilg",idxfile[0]); } - if ((logfile[0] != '\0') && kpse_out_name_ok(logfile)) + if (logfile && kpse_out_name_ok(logfile)) efp=fopen(logfile,"wb"); if(efp == NULL) { efp=stderr; - strcpy(logfile,"stderr"); + logfile=xstrdup("stderr"); } if (strcmp(argv[0],"makeindex")==0) { @@ -399,7 +399,7 @@ int main(int argc, char **argv) verb_printf(efp,"...done.\n"); - if (idxcount-fsti==0) strcpy(indfile,"stdout"); + if (idxcount-fsti==0) indfile=xstrdup("stdout"); verb_printf(efp,"%d warnings, written in %s.\n",warn,logfile); verb_printf(efp,"Output written in %s.\n",indfile); |