git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] prune-packed: Fix uninitialized variable.

From
AJAlexandre Julliard <julliard@winehq.org>
Date
Oct 23, 2006, 16:26 UTC
Message-ID
<87ejszvw00.fsf@wine.dyndns.org>

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(-)
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
Message 1 of 1 in “prune-packed: Fix uninitialized variable.”
  1. prune-packed: Fix uninitialized variable.Alexandre Julliard, Oct 23, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.