HomeClusterLabs Projects

Refactor: tools: Simplify is_scheduler_required() in crm_resource

Description

Refactor: tools: Simplify is_scheduler_required() in crm_resource

The set of commands in the default case contains the entire set of
commands for which get_find_flags() returns a nonzero value. Further,
no command in the false case has nonzero flags. So the
((get_find_flags != 0) && (options.rsc_id != NULL)) condition is
redundant.

The one exception was cmd_set_property. However, that case could never
have been hit in the switch statement. cmd_set_property has find flags
associated with it and requires a --resource argument (so options.rsc_id
!= NULL).

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Feb 23 2024, 10:33 PM
Parents
rPc6ecd74b4511: Refactor: tools: Functionize getting find_flags() in crm_resource
Branches
Unknown
Tags
Unknown