public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Sidong Yang <realwakka@gmail.com>
To: linux-btrfs@vger.kernel.org
Cc: Sidong Yang <realwakka@gmail.com>
Subject: [PATCH] btrfs-progs: fi resize: fix return value check_resize_args()
Date: Thu, 11 Aug 2022 15:22:39 +0000	[thread overview]
Message-ID: <20220811152239.2845-1-realwakka@gmail.com> (raw)

check_resize_args() function checks user argument amount and should
returns it's validity. But now the code returns only zero. This patch
make it correct to return ret.

Signed-off-by: Sidong Yang <realwakka@gmail.com>
---
 cmds/filesystem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmds/filesystem.c b/cmds/filesystem.c
index 7cd08fcd..9eff5680 100644
--- a/cmds/filesystem.c
+++ b/cmds/filesystem.c
@@ -1203,7 +1203,7 @@ static int check_resize_args(const char *amount, const char *path) {
 
 out:
 	free(di_args);
-	return 0;
+	return ret;
 }
 
 static int cmd_filesystem_resize(const struct cmd_struct *cmd,
-- 
2.34.1


             reply	other threads:[~2022-08-11 15:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11 15:22 Sidong Yang [this message]
2022-08-23 20:42 ` [PATCH] btrfs-progs: fi resize: fix return value check_resize_args() David Sterba
2022-09-12  7:58 ` Wang Yugui
2022-09-12 12:34   ` David Sterba

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=20220811152239.2845-1-realwakka@gmail.com \
    --to=realwakka@gmail.com \
    --cc=linux-btrfs@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