浏览代码

Fixed variable shadowing

Piotr Czajkowski 5 年之前
父节点
当前提交
6106ac9ca5
共有 1 个文件被更改,包括 3 次插入3 次删除
  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);
 	}