Skip to content

Commit b42e81a

Browse files
committed
Merge branch 'jk/maint-strbuf-missing-init' into maint
* jk/maint-strbuf-missing-init: commit, merge: initialize static strbuf
2 parents 4a242d6 + 03f94ae commit b42e81a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

builtin/commit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static enum commit_whence whence;
103103
static int use_editor = 1, include_status = 1;
104104
static int show_ignored_in_status;
105105
static const char *only_include_assumed;
106-
static struct strbuf message;
106+
static struct strbuf message = STRBUF_INIT;
107107

108108
static int null_termination;
109109
static enum {

builtin/merge.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static int show_diffstat = 1, shortlog_len, squash;
4848
static int option_commit = 1, allow_fast_forward = 1;
4949
static int fast_forward_only, option_edit;
5050
static int allow_trivial = 1, have_message;
51-
static struct strbuf merge_msg;
51+
static struct strbuf merge_msg = STRBUF_INIT;
5252
static struct commit_list *remoteheads;
5353
static struct strategy **use_strategies;
5454
static size_t use_strategies_nr, use_strategies_alloc;

0 commit comments

Comments
 (0)