Skip to content

Commit 52cfef4

Browse files
smf: fix null-check in get_child_of()
Co-authored-by: Keith Short <[email protected]>
1 parent 5b0b1a3 commit 52cfef4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/smf/smf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static const struct smf_state *get_child_of(const struct smf_state *states,
3838
{
3939
const struct smf_state *state = states;
4040

41-
while (state) {
41+
while (state != NULL) {
4242
if (state->parent == parent) {
4343
return state;
4444
}

0 commit comments

Comments
 (0)