Skip to content

Commit 7b7993e

Browse files
committed
pmix/base: fix coverity issue
CID 1269707 Logically dead code (DEADCODE) Coverity is correct that tmp3 can never be NULL here. Deleted the dead code. Signed-off-by: Nathan Hjelm <[email protected]>
1 parent 1d27b1f commit 7b7993e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

opal/mca/pmix/base/pmix_base_fns.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
3-
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
3+
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
44
* reserved.
55
* Copyright (c) 2014 Intel, Inc. All rights reserved.
66
* Copyright (c) 2014-2015 Research Organization for Information Science
@@ -424,11 +424,7 @@ int opal_pmix_base_cache_keys_locally(const opal_process_name_t* id, const char*
424424
kv->data.byte = *tmp3;
425425
break;
426426
case OPAL_STRING:
427-
if (NULL != tmp3) {
428-
kv->data.string = strdup(tmp3);
429-
} else {
430-
kv->data.string = NULL;
431-
}
427+
kv->data.string = strdup(tmp3);
432428
break;
433429
case OPAL_PID:
434430
kv->data.pid = strtoul(tmp3, NULL, 10);

0 commit comments

Comments
 (0)