Procházet zdrojové kódy

Fixed variable shadowing

Piotr Czajkowski před 5 roky
rodič
revize
6106ac9ca5
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3 3
      zip.c

+ 3 - 3
zip.c

@@ -71,10 +71,10 @@ int process(const char *infile, char *outfile) {
 	strcat(binnFile, ".bin");
 
 	if (!outfile || strcmp(infile, outfile) == 0){
-		const char *outfile = "tmpFile.docx";
-		processDOCX(infile, outfile);
+		const char *tmpFile = "tmpFile.docx";
+		processDOCX(infile, tmpFile);
 		remove(infile);
-		rename(outfile, infile);
+		rename(tmpFile, infile);
 	} else {
 		processDOCX(infile, outfile);
 	}