@matheusbsbs / matheus-bagliano / commits / cc46a74398
Fork 0

wt_status_prepare(): clean up structure initialization.

Otherwise it would be a pain to add members to it. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Feb 9, 2007 at 16:22 UTC cc46a74398e6a542d61d8fa0b197b7dedcd7f301
1 file changed +1 -8
wt-status.c
+1 -8
@@ -47,17 +47,10 @@ void wt_status_prepare(struct wt_status *s)
47 unsigned char sha1[20];
48 const char *head;
49
50 + memset(s, 0, sizeof(*s));
51 head = resolve_ref("HEAD", sha1, 0, NULL);
52 s->branch = head ? xstrdup(head) : NULL;
52 -
53 s->reference = "HEAD";
54 - s->amend = 0;
55 - s->verbose = 0;
56 - s->untracked = 0;
57 -
58 - s->commitable = 0;
59 - s->workdir_dirty = 0;
60 - s->workdir_untracked = 0;
54 }
55
56 static void wt_status_print_cached_header(const char *reference)