Skip to content

Commit 16538bf

Browse files
mirucamgitster
authored andcommitted
bisect--helper: convert vocab_* char pointers to char arrays
Instead of using a pointer that points at a constant string, just give name directly to the constant string; this way, we do not have to allocate a pointer variable in addition to the string we want to use. Let's convert `vocab_bad` and `vocab_good` char pointers to char arrays. Mentored-by: Christian Couder <[email protected]> Signed-off-by: Miriam Rubio <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d0654dc commit 16538bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builtin/bisect--helper.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ static void set_terms(struct bisect_terms *terms, const char *bad,
5252
terms->term_bad = xstrdup(bad);
5353
}
5454

55-
static const char *vocab_bad = "bad|new";
56-
static const char *vocab_good = "good|old";
55+
static const char vocab_bad[] = "bad|new";
56+
static const char vocab_good[] = "good|old";
5757

5858
/*
5959
* Check whether the string `term` belongs to the set of strings

0 commit comments

Comments
 (0)