Refactor: fencer: Best practices in update_cib_stonith_devices()
- Remove some nesting.
- Use const where possible.
- Improve variable names and scope.
- Use a macro for repeated string literal.
- Use sizeof() - 1 instead of strlen() for string literal.
- Remove unnecessary escaping of single quote within double quotes.
- Copy only what is needed of the xpath string, if anything.
- Log assertion on malformed patchset, since we created it in cib_perform_op().
- Add a comment to clarify why we're (apparently) doing all this in the first place.
Keep the watchdog_device_update() comment as-is because I haven't looked
into it.
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>