Merge branch 'rs/use-xstrncmpz'

Code clean-up.

* rs/use-xstrncmpz:
  use xstrncmpz()
This commit is contained in:
Junio C Hamano
2024-02-26 18:10:24 -08:00
10 changed files with 38 additions and 16 deletions

View File

@ -192,8 +192,7 @@ static struct strategy *get_strategy(const char *name)
int j, found = 0;
struct cmdname *ent = main_cmds.names[i];
for (j = 0; !found && j < ARRAY_SIZE(all_strategy); j++)
if (!strncmp(ent->name, all_strategy[j].name, ent->len)
&& !all_strategy[j].name[ent->len])
if (!xstrncmpz(all_strategy[j].name, ent->name, ent->len))
found = 1;
if (!found)
add_cmdname(&not_strategies, ent->name, ent->len);