diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-04-08 11:43:12 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-04-08 11:43:12 -0700 |
| commit | b97b360c514acd0f5a148524a85bcdb583dbe914 (patch) | |
| tree | dc16900efcc7576ec5211f9c340e18bd01dd9020 /scalar.c | |
| parent | The third batch (diff) | |
| parent | treewide: replace assert() with ASSERT() in special cases (diff) | |
| download | git-b97b360c514acd0f5a148524a85bcdb583dbe914.tar.gz git-b97b360c514acd0f5a148524a85bcdb583dbe914.zip | |
Merge branch 'en/assert-wo-side-effects'
Ensure what we write in assert() does not have side effects,
and introduce ASSERT() macro to mark those that cannot be
mechanically checked for lack of side effects.
* en/assert-wo-side-effects:
treewide: replace assert() with ASSERT() in special cases
ci: add build checking for side-effects in assert() calls
git-compat-util: introduce ASSERT() macro
Diffstat (limited to 'scalar.c')
| -rw-r--r-- | scalar.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -241,7 +241,7 @@ static int add_or_remove_enlistment(int add) static int start_fsmonitor_daemon(void) { - assert(have_fsmonitor_support()); + ASSERT(have_fsmonitor_support()); if (fsmonitor_ipc__get_state() != IPC_STATE__LISTENING) return run_git("fsmonitor--daemon", "start", NULL); @@ -251,7 +251,7 @@ static int start_fsmonitor_daemon(void) static int stop_fsmonitor_daemon(void) { - assert(have_fsmonitor_support()); + ASSERT(have_fsmonitor_support()); if (fsmonitor_ipc__get_state() == IPC_STATE__LISTENING) return run_git("fsmonitor--daemon", "stop", NULL); |
