Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: tbecker@redhat.com
To: linux-cifs@vger.kernel.org
Cc: Thiago Becker <tbecker@redhat.com>
Subject: [PATCH 1/2] cifscreds: use continue instead of break when matching commands
Date: Tue, 14 Jan 2025 17:34:49 -0300	[thread overview]
Message-ID: <20250114203449.172749-1-tbecker@redhat.com> (raw)

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(-)

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 */
-- 
2.47.1


             reply	other threads:[~2025-01-14 20:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-14 20:34 tbecker [this message]
2025-01-20 16:02 ` [PATCH 1/2] cifscreds: use continue instead of break when matching commands Paulo Alcantara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250114203449.172749-1-tbecker@redhat.com \
    --to=tbecker@redhat.com \
    --cc=linux-cifs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox