Since we already detect writemostly_ARG is non-zero
make it obvious pv_count will also be non-zero in this case.
if (arg_count(cmd, writebehind_ARG))
raid_seg->writebehind = arg_uint_value(cmd, writebehind_ARG, 0);
- if (arg_count(cmd, writemostly_ARG)) {
+ if ((pv_count = arg_count(cmd, writemostly_ARG))) {
/* writemostly can be specified more than once */
- pv_count = arg_count(cmd, writemostly_ARG);
pv_names = dm_pool_alloc(lv->vg->vgmem, sizeof(char *) * pv_count);
if (!pv_names)
return_0;