Skip to contentSkip to conversation

Btrfs-progs: cmds-subvolume: use parameter str instead of optarg

PATCH New Rakesh Pandit 1 participant 1 message Apr 19, 2014 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Btrfs-progs: cmds-subvolume: use parameter str instead of optarg

Fix unused parameter str (commit e8cfa3c8): get_subvolid was called with optarg passed as str, but get_subvolid kept using optarg.

---
 cmds-subvolume.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
cmds-subvolume.c +2 -2
index bd81a8f..639fb10 100644
@@ -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;
Signature · 1 line
1.8.5.3