diff mbox series

[1/2] cifscreds: use continue instead of break when matching commands

Message ID 20250114203449.172749-1-tbecker@redhat.com (mailing list archive)
State New, archived
Headers show
Series [1/2] cifscreds: use continue instead of break when matching commands | expand

Commit Message

Thiago Becker Jan. 14, 2025, 8:34 p.m. UTC
From: Thiago Becker <tbecker@redhat.com>

While matching the commands in cifscreds, continue attempting to
match to detect ambiguous commands.

Signed-off-by: Thiago Becker <tbecker@redhat.com>
---
 cifscreds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paulo Alcantara Jan. 20, 2025, 4:02 p.m. UTC | #1
tbecker@redhat.com writes:

> From: Thiago Becker <tbecker@redhat.com>
>
> While matching the commands in cifscreds, continue attempting to
> match to detect ambiguous commands.
>
> Signed-off-by: Thiago Becker <tbecker@redhat.com>
> ---
>  cifscreds.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
diff mbox series

Patch

diff --git a/cifscreds.c b/cifscreds.c
index 32f2ee4..c52f495 100644
--- a/cifscreds.c
+++ b/cifscreds.c
@@ -501,7 +501,7 @@  int main(int argc, char **argv)
 		if (cmd->name[n] == 0) {
 			/* exact match */
 			best = cmd;
-			break;
+			continue;
 		}
 
 		/* partial match */