mirror of
https://github.com/git/git.git
synced 2026-01-10 01:56:42 +00:00
treewide: replace assert() with ASSERT() in special cases
When the compiler/linker cannot verify that an assert() invocation is free of side effects for us (e.g. because the assertion includes some kind of function call), replace the use of assert() with ASSERT(). Signed-off-by: Elijah Newren <newren@gmail.com> Acked-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
85e4f762c2
commit
5633aa3af1
4
scalar.c
4
scalar.c
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user