diff options
| author | Simon Glass <[email protected]> | 2024-10-14 16:31:56 -0600 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2024-10-18 14:10:22 -0600 |
| commit | 89f4f33c447e4c17e43372e3e91525187c43f54e (patch) | |
| tree | e2797ddda23d3208ac0ce04001bdd01da4c62123 /boot | |
| parent | 54eca1d39bc980a7e99af53a5b32443d5774b1a0 (diff) | |
expo: Set the initial next_id to 1
If expo_set_dynamic_start() is never called, the first scene created
will have an ID of 0, which is invalid. Correct this by setting a
default value.
Add a test to check this.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'boot')
| -rw-r--r-- | boot/expo.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/boot/expo.c b/boot/expo.c index c7ce19e834b..700786ec0cc 100644 --- a/boot/expo.c +++ b/boot/expo.c @@ -29,6 +29,7 @@ int expo_new(const char *name, void *priv, struct expo **expp) exp->priv = priv; INIT_LIST_HEAD(&exp->scene_head); INIT_LIST_HEAD(&exp->str_head); + exp->next_id = 1; *expp = exp; |
