Explorar o código

Fixed variable shadowing

Piotr Czajkowski %!s(int64=5) %!d(string=hai) anos
pai
achega
6106ac9ca5
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  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);
 	}