smf: simplify get_child_of() loop and rename local to 'state'

Replace the open-ended while(true) with a null-terminated parent walk.
Improves readability, behavior is unchanged.

Signed-off-by: Vlad Kulikov <vlad_kulikov_c@pm.me>
1 file changed