summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorJoseph Sutton <josephsutton@catalyst.net.nz>2023-04-04 11:34:47 +1200
committerAndreas Schneider <asn@cryptomilk.org>2023-04-12 13:52:31 +0000
commit440c3e869718b6e1e7d1641ae2d12ffed96feabf (patch)
tree715eb09456e666ba2bffea7f3925c2f72945ab19 /ctdb
parentfd159aaa80006afc5dbac292ceea506b1e3c2fbd (diff)
downloadsamba-440c3e869718b6e1e7d1641ae2d12ffed96feabf.tar.gz
ctdb:tool: Remove unnecessary strlen()
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/tools/ctdb.c3
1 files changed, 1 insertions, 2 deletions
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; 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;
}
}