summaryrefslogtreecommitdiff
path: root/color.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-30 05:04:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-30 05:04:07 (GMT)
commit50f08db5941755b69012378bfc86f6b8ee98edf4 (patch)
treed403a1dbf522fdaab4cf6b9b508a08b3965828e2 /color.c
parentbef896e4ab414312cdca493e0306d66ec7246b01 (diff)
parent746ea4adc6cd88ad5f5af6beebace581fe489b2f (diff)
downloadgit-50f08db5941755b69012378bfc86f6b8ee98edf4.zip
git-50f08db5941755b69012378bfc86f6b8ee98edf4.tar.gz
git-50f08db5941755b69012378bfc86f6b8ee98edf4.tar.bz2
Merge branch 'js/use-bug-macro'
Developer support update, by using BUG() macro instead of die() to mark codepaths that should not happen more clearly. * js/use-bug-macro: BUG_exit_code: fix sparse "symbol not declared" warning Convert remaining die*(BUG) messages Replace all die("BUG: ...") calls by BUG() ones run-command: use BUG() to report bugs, not die() test-tool: help verifying BUG() code paths
Diffstat (limited to 'color.c')
-rw-r--r--color.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/color.c b/color.c
index c6c6c4f..b1c24c6 100644
--- a/color.c
+++ b/color.c
@@ -174,7 +174,7 @@ static char *color_output(char *out, int len, const struct color *c, char type)
break;
case COLOR_ANSI:
if (len < 2)
- die("BUG: color parsing ran out of space");
+ BUG("color parsing ran out of space");
*out++ = type;
*out++ = '0' + c->value;
break;
@@ -256,7 +256,7 @@ int color_parse_mem(const char *value, int value_len, char *dst)
#undef OUT
#define OUT(x) do { \
if (dst == end) \
- die("BUG: color parsing ran out of space"); \
+ BUG("color parsing ran out of space"); \
*dst++ = (x); \
} while(0)