* [PATCH] Btrfs-progs: cmds-subvolume: use parameter str instead of optarg
@ 2014-04-19 0:14 Rakesh Pandit
0 siblings, 0 replies; only message in thread
From: Rakesh Pandit @ 2014-04-19 0:14 UTC (permalink / raw)
To: linux-btrfs
Fix unused parameter str (commit e8cfa3c8): get_subvolid was called
with optarg passed as str, but get_subvolid kept using optarg.
Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
---
cmds-subvolume.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index bd81a8f..639fb10 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -596,9 +596,9 @@ static int get_subvolid(const char *str, u64 *subvolid)
{
char *p;
errno = 0;
- *subvolid = strtoull(optarg, &p, 10);
+ *subvolid = strtoull(str, &p, 10);
if (errno || *p != '\0') {
- fprintf(stderr, "ERROR: invalid subvolume id '%s'\n", optarg);
+ fprintf(stderr, "ERROR: invalid subvolume id '%s'\n", str);
return -EINVAL;
}
return 0;
--
1.8.5.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-04-19 0:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-19 0:14 [PATCH] Btrfs-progs: cmds-subvolume: use parameter str instead of optarg Rakesh Pandit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).