summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7c4ed8c)
raw | patch | inline | side by side (parent: 7c4ed8c)
author | Brian Downing <bdowning@lavos.net> | |
Sat, 25 Oct 2008 13:30:37 +0000 (15:30 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 25 Oct 2008 19:09:31 +0000 (12:09 -0700) |
We're going to be adding some parameters to this, so we can't have
any uninitialized data in it.
Signed-off-by: Brian Downing <bdowning@lavos.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
any uninitialized data in it.
Signed-off-by: Brian Downing <bdowning@lavos.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-blame.c | patch | blob | history | |
builtin-rerere.c | patch | blob | history | |
combine-diff.c | patch | blob | history | |
diff.c | patch | blob | history | |
merge-file.c | patch | blob | history |
diff --git a/builtin-blame.c b/builtin-blame.c
index 593b539f1ed97a442b80999b363916b36c836dd1..5ca7065171b4a531b6133f4ab1aa36392d72d0c3 100644 (file)
--- a/builtin-blame.c
+++ b/builtin-blame.c
xdemitconf_t xecfg;
xdemitcb_t ecb;
+ memset(&xpp, 0, sizeof(xpp));
xpp.flags = xdl_opts;
memset(&xecfg, 0, sizeof(xecfg));
xecfg.ctxlen = context;
diff --git a/builtin-rerere.c b/builtin-rerere.c
index dd4573fe8dcd9dc8edd5a7d41bc8daa83034ee7e..d4dec6b7156b081bf63933d4de6d0b62ab2212c8 100644 (file)
--- a/builtin-rerere.c
+++ b/builtin-rerere.c
printf("--- a/%s\n+++ b/%s\n", label1, label2);
fflush(stdout);
+ memset(&xpp, 0, sizeof(xpp));
xpp.flags = XDF_NEED_MINIMAL;
memset(&xecfg, 0, sizeof(xecfg));
xecfg.ctxlen = 3;
diff --git a/combine-diff.c b/combine-diff.c
index 5aa1104d3480f8057dd71c49bcf300eccabe2f9d..ec8df39bb01347eb035ad94553357b80af652b78 100644 (file)
--- a/combine-diff.c
+++ b/combine-diff.c
parent_file.ptr = grab_blob(parent, &sz);
parent_file.size = sz;
+ memset(&xpp, 0, sizeof(xpp));
xpp.flags = XDF_NEED_MINIMAL;
memset(&xecfg, 0, sizeof(xecfg));
memset(&state, 0, sizeof(state));
index 1c6be897b2c95fc481c02834e4fe022b6bd405ae..f141e7c8ff661733c2be6652709cc60c3340100e 100644 (file)
--- a/diff.c
+++ b/diff.c
mmfile_t minus, plus;
int i;
+ memset(&xpp, 0, sizeof(xpp));
memset(&xecfg, 0, sizeof(xecfg));
minus.size = diff_words->minus.text.size;
minus.ptr = xmalloc(minus.size);
if (!pe)
pe = diff_funcname_pattern(two);
+ memset(&xpp, 0, sizeof(xpp));
memset(&xecfg, 0, sizeof(xecfg));
memset(&ecbdata, 0, sizeof(ecbdata));
ecbdata.label_path = lbl;
xdemitconf_t xecfg;
xdemitcb_t ecb;
+ memset(&xpp, 0, sizeof(xpp));
memset(&xecfg, 0, sizeof(xecfg));
xpp.flags = XDF_NEED_MINIMAL | o->xdl_opts;
xdi_diff_outf(&mf1, &mf2, diffstat_consume, diffstat,
xdemitconf_t xecfg;
xdemitcb_t ecb;
+ memset(&xpp, 0, sizeof(xpp));
memset(&xecfg, 0, sizeof(xecfg));
xecfg.ctxlen = 1; /* at least one context line */
xpp.flags = XDF_NEED_MINIMAL;
@@ -3149,6 +3153,7 @@ static int diff_get_patch_id(struct diff_options *options, unsigned char *sha1)
struct diff_filepair *p = q->queue[i];
int len1, len2;
+ memset(&xpp, 0, sizeof(xpp));
memset(&xecfg, 0, sizeof(xecfg));
if (p->status == 0)
return error("internal diff status error");
diff --git a/merge-file.c b/merge-file.c
index 2a939c9dd835a7e7946eb1548e4cf637ae3ca329..3120a95f786eadd4cb5d167facc15714904e9665 100644 (file)
--- a/merge-file.c
+++ b/merge-file.c
xdemitconf_t xecfg;
xdemitcb_t ecb;
+ memset(&xpp, 0, sizeof(xpp));
xpp.flags = XDF_NEED_MINIMAL;
memset(&xecfg, 0, sizeof(xecfg));
xecfg.ctxlen = 3;