Skip to content

Commit 1e7de54

Browse files
committed
Refactor: libcib: Assert to satisfy Coverity
Coverity is throwing a CHECKED_RETURN error here, because we check the return value of cib__get_operation() 4 out of 5 times. However, it was already checked in file_perform_op_delegate(). Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
1 parent 90b599f commit 1e7de54

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/cib/cib_file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ process_request(cib_t *cib, xmlNode *request, xmlNode **output)
151151

152152
file_opaque_t *private = cib->variant_opaque;
153153

154-
// We error checked these in callers
155-
cib__get_operation(op, &operation);
154+
// We error checked these in callers, but make Coverity happy
155+
pcmk__assert(cib__get_operation(op, &operation) == pcmk_rc_ok);
156156
op_function = get_op_function(operation);
157157

158158
rc = pcmk__xe_get_flags(request, PCMK__XA_CIB_CALLOPT, &call_options,

0 commit comments

Comments
 (0)