format-text: ensure aligment is not 0

Make sure this path of code is not used for alignment == 0,
to prevent division by 0.
snapshot: drop find_merging_snapshot

Drop find_merging_snapshot() function. Use find_snapshot()
called after check for lv_is_merging_origin() which
is the commonly used code path - so we avoid duplicated
tests and potential risk of derefering NULL point
in unhandled error path.
config: use int for type

Since the type is used for 'or' operation of enumerated bit fields,
it doesn't not have type cfg_def_type_t - use proper int type for
bitmask.
dmeventd: fifo init and close cleanup

Use structure initialization for easier to read code.
Close only descriptors >= 0.
dmeventd: simplify error path

Use common 'bad:' label for exit error path where
fifo is closed before exit().
snapshot: move code of old snapshot merge

Move code for merging old snapshot into its own function.
toollib: drop init of ret

Keep the ret uninitialized, so we get compiler warning, when tried
to use this value instead of ret_max as function return value.
cleanup: use compound literals for wipe_lv

Optimize and cleanup recently introduced new function wipe_lv.
Use compound literals to get nicely initialized wipe_params struct.
Pass in lv as explicit argument for wipe_lv.
Use cmd from lv structure.
Initialize only non-null members so it's easy to see what
is the special arg.
cleanup: fold test into printf arg

When arg is folded, compiler is able to check all args.
(better for security)
cleanup: drop extra dm_list_empty

Since dm_list_first has this check already include,
skip extra call in while().
Moreover analyzers are then sure pvl is not NULL.
cleanup: use matching signed types
cleanup: move declaration to the front
cleanup: convert log_sys_error to log_sys_debug

Use debug for those error reports which do not lead to error return
call.
cleanup: convert log_error with log_warn

Collapse 2 ifs and replace log_error() with log_warn(), since\
the reported message is not causing tools error.
(and cannot be probably triggered anyway).
cleanup: tab indent
pvcreate: do not issue warning about any existing PV

If we're calling pvcreate on a device that already has a PV label,
the blkid detects the existing PV and then we consider it for wiping
before we continue creating the new PV label and we issue a warning
with a prompt whether such old PV label should be removed. We don't
do this with native signature detection code. Let's make it consistent
with old behaviour.

But still keep this "PV" (identified as "LVM1_member" or "LVM2_member"
by blkid) detection when creating new LVs to avoid unexpected PV label
appeareance inside LV.
tests: initialize signature wiping

Do not use signature wiping for newly created LVs in tests - we're
reusing the devs in tests and such detection could just interfere
inappropriately. We'd need to modify all tests to anwer the prompt
whether any signature found should be removed or not or we'd need
to use "-y" option for all lvcreates in tests. It's better to disable
this feature then and let's do a separate test to test this signature
wiping functionality.
tests: wipe fs signature manually in pvcreate-operation test

So that the next pvcreate that is called does not issue any
warnings/prompts about existing signature (when blkid wiping is used).
tests: add test for lvcreate signature wiping
lvmetad: Add newline to missing socket error mesg