diff options
Diffstat (limited to 'cmds-subvolume.c')
-rw-r--r-- | cmds-subvolume.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/cmds-subvolume.c b/cmds-subvolume.c index 0bd76f2e..5e821c71 100644 --- a/cmds-subvolume.c +++ b/cmds-subvolume.c @@ -820,11 +820,7 @@ static int cmd_subvol_set_default(int argc, char **argv) subvolid = argv[1]; path = argv[2]; - objectid = (unsigned long long)strtoll(subvolid, NULL, 0); - if (errno == ERANGE) { - fprintf(stderr, "ERROR: invalid tree id (%s)\n", subvolid); - return 1; - } + objectid = arg_strtou64(subvolid); fd = open_file_or_dir(path, &dirstream); if (fd < 0) { @@ -861,7 +857,7 @@ static int cmd_find_new(int argc, char **argv) usage(cmd_find_new_usage); subvol = argv[1]; - last_gen = atoll(argv[2]); + last_gen = arg_strtou64(argv[2]); ret = test_issubvolume(subvol); if (ret < 0) { |