1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-11 16:58:40 +03:00

ctdb:tool: Remove unnecessary strlen()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Joseph Sutton 2023-04-04 11:34:47 +12:00 committed by Andreas Schneider
parent fd159aaa80
commit 440c3e8697

View File

@ -6168,8 +6168,7 @@ static const struct ctdb_cmd *match_command(const char *command)
for (i=0; i<ARRAY_SIZE(ctdb_commands); i++) {
cmd = &ctdb_commands[i];
if (strlen(command) == strlen(cmd->name) &&
strncmp(command, cmd->name, strlen(command)) == 0) {
if (strcmp(command, cmd->name) == 0) {
return cmd;
}
}