aboutsummaryrefslogtreecommitdiffstats
path: root/trace2.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-06-10 15:04:15 -0700
committerJunio C Hamano <gitster@pobox.com>2022-06-10 15:04:15 -0700
commit4da14b574f2e52eb05e4fef7ed169a8f9e3a8b67 (patch)
tree134a132278b3ca34974f2812b24acb5fe9a47810 /trace2.c
parentMerge branch 'jy/gitweb-xhtml5' (diff)
parentcache-tree.c: use bug() and BUG_if_bug() (diff)
downloadgit-4da14b574f2e52eb05e4fef7ed169a8f9e3a8b67.tar.gz
git-4da14b574f2e52eb05e4fef7ed169a8f9e3a8b67.zip
Merge branch 'ab/bug-if-bug'
A new bug() and BUG_if_bug() API is introduced to make it easier to uniformly log "detect multiple bugs and abort in the end" pattern. * ab/bug-if-bug: cache-tree.c: use bug() and BUG_if_bug() receive-pack: use bug() and BUG_if_bug() parse-options.c: use optbug() instead of BUG() "opts" check parse-options.c: use new bug() API for optbug() usage.c: add a non-fatal bug() function to go with BUG() common-main.c: move non-trace2 exit() behavior out of trace2.c
Diffstat (limited to 'trace2.c')
-rw-r--r--trace2.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/trace2.c b/trace2.c
index e01cf77f1a..0c0a11e07d 100644
--- a/trace2.c
+++ b/trace2.c
@@ -202,17 +202,15 @@ void trace2_cmd_start_fl(const char *file, int line, const char **argv)
argv);
}
-int trace2_cmd_exit_fl(const char *file, int line, int code)
+void trace2_cmd_exit_fl(const char *file, int line, int code)
{
struct tr2_tgt *tgt_j;
int j;
uint64_t us_now;
uint64_t us_elapsed_absolute;
- code &= 0xff;
-
if (!trace2_enabled)
- return code;
+ return;
trace_git_fsync_stats();
trace2_collect_process_info(TRACE2_PROCESS_INFO_EXIT);
@@ -226,8 +224,6 @@ int trace2_cmd_exit_fl(const char *file, int line, int code)
if (tgt_j->pfn_exit_fl)
tgt_j->pfn_exit_fl(file, line, us_elapsed_absolute,
code);
-
- return code;
}
void trace2_cmd_error_va_fl(const char *file, int line, const char *fmt,