Skip to content

Commit

Permalink
mx_proc: Add missing initialization
Browse files Browse the repository at this point in the history
If pid 1 is not found in the loop, `pid1` will be left unititialized,
yet it is evaluated in `if (!pid1)` after the loop.

Add missing initialization.
  • Loading branch information
donald committed Feb 21, 2022
1 parent 7bd4b22 commit e58f37c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mx_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ static struct mx_proc_tree_node *mx_proc_tree_add(struct mx_proc_tree *pt, struc
static void mx_proc_tree_reorder_roots(struct mx_proc_tree *pt)
{
struct mx_proc_tree_node *current;
struct mx_proc_tree_node *pid1;
struct mx_proc_tree_node *pid1 = NULL;
struct mx_proc_tree_node *last = NULL;
struct mx_proc_tree_node *next = NULL;

Expand Down

0 comments on commit e58f37c

Please sign in to comment.