diff --git a/src/common/callerid.c b/src/common/callerid.c index 770db50797cb73845c090ebad45d696191866390..d9e13aa4cb7d081e638f5a19c24160d9c33c37b0 100644 --- a/src/common/callerid.c +++ b/src/common/callerid.c @@ -332,10 +332,6 @@ extern int find_pid_by_inode (pid_t *pid_result, ino_t inode) readdir_r(dirp, entryp, &result); if (!result) break; - /* This check is probably unnecessary due to the !result check - * but better safe than sorry */ - else if (!entryp->d_name) - continue; /* We're only looking for /proc/[0-9]* */ else if (!isdigit(entryp->d_name[0])) continue; diff --git a/src/common/gres.c b/src/common/gres.c index 0f5d9158911066673936c78688b99e7dfa46d6c0..590090aca5d43cd2d8faa9307d6c71919668d671 100644 --- a/src/common/gres.c +++ b/src/common/gres.c @@ -828,7 +828,7 @@ static int _parse_gres_config(void **dest, slurm_parser_enum_t type, fatal("Invalid gres data for %s, Count does not match " "File value", p->name); } - if ((tmp_uint64 < 0) || (tmp_uint64 >= NO_VAL)) { + if (tmp_uint64 >= NO_VAL64) { fatal("Gres %s has invalid count value %"PRIu64, p->name, tmp_uint64); } diff --git a/src/plugins/switch/generic/switch_generic.c b/src/plugins/switch/generic/switch_generic.c index c7b472c3be1afce7b991af4ce4f68736e6bf186c..26211607a497d2cb4a5b8a376fb0e8e997de773b 100644 --- a/src/plugins/switch/generic/switch_generic.c +++ b/src/plugins/switch/generic/switch_generic.c @@ -834,8 +834,6 @@ extern int switch_p_build_node_info(switch_node_info_t *switch_node) gen_node_info->node_name = xstrdup(hostname); if (getifaddrs(&if_array) == 0) { for (if_rec = if_array; if_rec; if_rec = if_rec->ifa_next) { - if (!if_rec->ifa_addr->sa_data) - continue; #if !defined(__FreeBSD__) if (if_rec->ifa_flags & IFF_LOOPBACK) continue; diff --git a/src/slurmctld/node_mgr.c b/src/slurmctld/node_mgr.c index e2dc5df35b4fc85c05c059c774f0340335216865..63f6ec8a50a74577dce405dca74b09bd95acdb70 100644 --- a/src/slurmctld/node_mgr.c +++ b/src/slurmctld/node_mgr.c @@ -1647,7 +1647,7 @@ static int _update_node_weight(char *node_names, uint32_t weight) } else { /* partial update, split config_record */ new_config_ptr = _dup_config(config_ptr); - if (first_new == NULL); + if (first_new == NULL) first_new = new_config_ptr; /* Change weight for the given node */ new_config_ptr->weight = weight; @@ -1719,7 +1719,7 @@ static int _update_node_features(char *node_names, char *features) } else { /* partial update, split config_record */ new_config_ptr = _dup_config(config_ptr); - if (first_new == NULL); + if (first_new == NULL) first_new = new_config_ptr; xfree(new_config_ptr->feature); if (features && features[0]) @@ -1793,7 +1793,7 @@ static int _update_node_gres(char *node_names, char *gres) } else { /* partial update, split config_record */ new_config_ptr = _dup_config(config_ptr); - if (first_new == NULL); + if (first_new == NULL) first_new = new_config_ptr; xfree(new_config_ptr->gres); if (gres && gres[0])