Skip to content

Commit 8c20c19

Browse files
author
Luke Robison
committed
opal/util/json: Remove an extraneous check
Fixes Coverity Issue 1646442. Signed-off-by: Luke Robison <lrbison@amazon.com>
1 parent 2ae4288 commit 8c20c19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

opal/util/json/opal_json.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ int opal_json_get_key_by_index(const opal_json_t *json, const size_t index, cons
203203

204204
json_object_entry entry = {0};
205205

206-
if (index < 0 || index >= in->value->u.object.length) {
206+
if (index >= in->value->u.object.length) {
207207
opal_show_help("help-json.txt", "Index out of bound", true, index,
208208
in->value->u.array.length);
209209
return ret;

0 commit comments

Comments
 (0)