Skip to content

Commit 44ca8c4

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 44ca8c4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/cib/cib_file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ process_request(cib_t *cib, xmlNode *request, xmlNode **output)
154154
// We error checked these in callers
155155
cib__get_operation(op, &operation);
156156
op_function = get_op_function(operation);
157+
pcmk__assert((operation != NULL) && (op_function != NULL));
157158

158159
rc = pcmk__xe_get_flags(request, PCMK__XA_CIB_CALLOPT, &call_options,
159160
cib_none);

0 commit comments

Comments
 (0)