From: Zdenek Kabelac Date: Fri, 31 Oct 2014 10:41:03 +0000 (+0100) Subject: cleanup: use arg_is_set X-Git-Tag: v2_02_112~64 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=d574072dd8eb11f54c2f9835e49da5b193cdfca7;p=lvm2.git cleanup: use arg_is_set --- diff --git a/tools/toollib.c b/tools/toollib.c index 0472597c3..5906ccb7a 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -978,13 +978,12 @@ int get_pool_params(struct cmd_context *cmd, *passed_args = 0; if (segtype_is_thin_pool(segtype) || segtype_is_thin(segtype)) { - if (arg_count(cmd, zero_ARG)) { + if (arg_is_set(cmd, zero_ARG)) { *passed_args |= PASS_ARG_ZERO; *zero = arg_int_value(cmd, zero_ARG, 1); log_very_verbose("Setting pool zeroing: %u", *zero); } - - if (arg_count(cmd, discards_ARG)) { + if (arg_is_set(cmd, discards_ARG)) { *passed_args |= PASS_ARG_DISCARDS; *discards = (thin_discards_t) arg_uint_value(cmd, discards_ARG, 0); log_very_verbose("Setting pool discards: %s",