From: Joseph Sutton Date: Mon, 3 Apr 2023 23:34:47 +0000 (+1200) Subject: ctdb:tool: Remove unnecessary strlen() X-Git-Tag: talloc-2.4.1~944 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=440c3e869718b6e1e7d1641ae2d12ffed96feabf;p=thirdparty%2Fsamba.git ctdb:tool: Remove unnecessary strlen() Signed-off-by: Joseph Sutton Reviewed-by: Andreas Schneider --- diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index 35e43ee7291..67d2f6bc1c9 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -6168,8 +6168,7 @@ static const struct ctdb_cmd *match_command(const char *command) for (i=0; iname) && - strncmp(command, cmd->name, strlen(command)) == 0) { + if (strcmp(command, cmd->name) == 0) { return cmd; } }