threads / patch / 6012

patchprune-packed: Fix uninitialized variable.

Subject: [PATCH] prune-packed: Fix uninitialized variable.

## tl;dr

One message between Oct 23, 2006 and Oct 23, 2006. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Alexandre Julliard· Oct 23, 2006, 16:26 UTC · lore

The dryrun variable was made local instead of static by the previous commit, and local variables aren't initialized to zero.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
---
 builtin-prune-packed.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to builtin-prune-packed.c +1 −1
diff --git a/builtin-prune-packed.c b/builtin-prune-packed.c
index e12b6cf..24e3b0a 100644
--- a/builtin-prune-packed.c
+++ b/builtin-prune-packed.c
@@ -56,7 +56,7 @@ void prune_packed_objects(int dryrun)
 int cmd_prune_packed(int argc, const char **argv, const char *prefix)
 {
 	int i;
-	int dryrun;
+	int dryrun = 0;
 
 	for (i = 1; i < argc; i++) {
 		const char *arg = argv[i];
-- 
1.4.3.1.g7d714

-- 
Alexandre Julliard
julliard@winehq.org

← back to recent threads