1
1

orte/util: revamp orte_attr_unload() to keep valgrind happy

reorder tests to avoid valgrind complaining about uninitialized variables

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Этот коммит содержится в:
Gilles Gouaillardet 2016-11-24 13:26:06 +09:00
родитель c612499bc1
Коммит 88535b6200

Просмотреть файл

@ -1,6 +1,6 @@
/*
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved
* Copyright (c) 2014-2016 Research Organization for Information Science
* Copyright (c) 2014-2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
@ -497,8 +497,8 @@ static int orte_attr_unload(orte_attribute_t *kv,
return OPAL_ERR_TYPE_MISMATCH;
}
if (NULL == data ||
(NULL == *data && OPAL_STRING != type && OPAL_BYTE_OBJECT != type &&
OPAL_BUFFER != type && OPAL_PTR != type)) {
(OPAL_STRING != type && OPAL_BYTE_OBJECT != type &&
OPAL_BUFFER != type && OPAL_PTR != type && NULL == *data)) {
assert(0);
OPAL_ERROR_LOG(OPAL_ERR_BAD_PARAM);
return OPAL_ERR_BAD_PARAM;