diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2024-11-17 02:31:49 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-11-18 01:42:08 +0100 |
commit | 639cd8db63b07c958062bde4d3823dadbf469b0b (patch) | |
tree | bb57035a3dc5554f943973bd1513fac42c1529b5 | |
parent | index-pack: rename struct thread_local (diff) | |
download | git-639cd8db63b07c958062bde4d3823dadbf469b0b.tar.xz git-639cd8db63b07c958062bde4d3823dadbf469b0b.zip |
reflog: rename unreachable
In C23, "unreachable" is a macro that invokes undefined behavior if it
is invoked. To make sure that our code compiles on a variety of C
versions, rename unreachable to "is_unreachable".
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | reflog.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -210,7 +210,7 @@ static void mark_reachable(struct expire_reflog_policy_cb *cb) cb->mark_list = leftover; } -static int unreachable(struct expire_reflog_policy_cb *cb, struct commit *commit, struct object_id *oid) +static int is_unreachable(struct expire_reflog_policy_cb *cb, struct commit *commit, struct object_id *oid) { /* * We may or may not have the commit yet - if not, look it @@ -265,7 +265,7 @@ int should_expire_reflog_ent(struct object_id *ooid, struct object_id *noid, return 1; case UE_NORMAL: case UE_HEAD: - if (unreachable(cb, old_commit, ooid) || unreachable(cb, new_commit, noid)) + if (is_unreachable(cb, old_commit, ooid) || is_unreachable(cb, new_commit, noid)) return 1; break; } |