Skip to content

Commit 3719667

Browse files
committed
Refactor: fencer: Assume build_port_aliases():targets is non-NULL
This is a static function with only one caller, and that caller always passes the address of a struct member. Signed-off-by: Reid Wahl <[email protected]>
1 parent a5bd5c8 commit 3719667

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

daemons/fenced/fenced_commands.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -954,9 +954,7 @@ build_port_aliases(const char *hostmap, GList ** targets)
954954

955955
crm_debug("Adding alias '%s'='%s'", name, value);
956956
g_hash_table_replace(aliases, name, value);
957-
if (targets) {
958-
*targets = g_list_append(*targets, pcmk__str_copy(value));
959-
}
957+
*targets = g_list_append(*targets, pcmk__str_copy(value));
960958
value = NULL;
961959
name = NULL;
962960
added++;

0 commit comments

Comments
 (0)