mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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
This commit is contained in:
4
color.c
4
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user