diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-02-26 18:10:24 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-02-26 18:10:24 -0800 |
| commit | 274400998b0a2da64d20e9fa95b288bf1403459c (patch) | |
| tree | 520059d779f2d3e93ab4ba91e4bc9e0bb8d37313 /builtin/reflog.c | |
| parent | cf47fb7ec7e183a1a1e521a540862fba3c2a89eb (diff) | |
| parent | f0e578c69cd91a554179c09dab6989f6eb0e2910 (diff) | |
Merge branch 'rs/use-xstrncmpz'
Code clean-up.
* rs/use-xstrncmpz:
use xstrncmpz()
Diffstat (limited to 'builtin/reflog.c')
| -rw-r--r-- | builtin/reflog.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/reflog.c b/builtin/reflog.c index a5a4099f61..2c3369fca5 100644 --- a/builtin/reflog.c +++ b/builtin/reflog.c @@ -96,8 +96,7 @@ static struct reflog_expire_cfg *find_cfg_ent(const char *pattern, size_t len) reflog_expire_cfg_tail = &reflog_expire_cfg; for (ent = reflog_expire_cfg; ent; ent = ent->next) - if (!strncmp(ent->pattern, pattern, len) && - ent->pattern[len] == '\0') + if (!xstrncmpz(ent->pattern, pattern, len)) return ent; FLEX_ALLOC_MEM(ent, pattern, pattern, len); |
