Skip to content
Snippets Groups Projects
Commit 1e5ec2e8 authored by Morris Jette's avatar Morris Jette
Browse files

Code hardening

Coverity CID 44847
parent 91f33e51
No related branches found
No related tags found
No related merge requests found
...@@ -2169,18 +2169,19 @@ extern bool check_part_includes_node(int node_dx) ...@@ -2169,18 +2169,19 @@ extern bool check_part_includes_node(int node_dx)
{ {
partition_info_t *part_ptr = NULL; partition_info_t *part_ptr = NULL;
bool rc = false; bool rc = false;
int i = 0; int i;
static partition_info_msg_t *part_info_ptr = NULL; static partition_info_msg_t *part_info_ptr = NULL;
if (working_sview_config.show_hidden) if (working_sview_config.show_hidden)
return true; return true;
if (!g_part_info_ptr) if (!g_part_info_ptr) {
i = get_new_info_part(&part_info_ptr, true); i = get_new_info_part(&part_info_ptr, true);
if (i && (i != SLURM_NO_CHANGE_IN_DATA)) { if (!g_part_info_ptr || (i && (i != SLURM_NO_CHANGE_IN_DATA))) {
if (_DEBUG) if (_DEBUG)
g_print("check_part_includes_node : error %d ", i); g_print("%s : error %d ", __func__, i);
return false; return false;
}
} }
for (i = 0; i < g_part_info_ptr->record_count; i++) { for (i = 0; i < g_part_info_ptr->record_count; i++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment