summaryrefslogtreecommitdiff
path: root/doc/develop
diff options
context:
space:
mode:
authorChristoph Niedermaier <[email protected]>2024-12-07 00:04:19 +0100
committerFabio Estevam <[email protected]>2024-12-07 09:07:45 -0300
commit86f58ea539e35b47235dff0dd77ec20fe8894469 (patch)
tree80caf2023734b0baeac12803e3f95052abeaa1b6 /doc/develop
parent489b965564ad73c7a2e8f8743908347775c5df3b (diff)
lib: hashtable: Prevent recursive calling of callback functions
In case there are two variables which each implement env callback that performs env_set() on the other variable, the callbacks will call each other recursively until the stack runs out. Prevent such a recursion from happening. Example which triggers this behavior: static int on_foo(...) { env_set("bar", 0); ... } static int on_bar(...) { env_set("foo", 0); ... } U_BOOT_ENV_CALLBACK(foo, on_foo); U_BOOT_ENV_CALLBACK(bar, on_bar); Signed-off-by: Christoph Niedermaier <[email protected]> Suggested-by: Marek Vasut <[email protected]>
Diffstat (limited to 'doc/develop')
0 files changed, 0 insertions, 0 deletions