Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 37f3758a authored by Marek Behún's avatar Marek Behún Committed by Simon Glass
Browse files

env: Use static_assert() to check if default_environment is too large


Check sizeof(default_environment) against ENV_SIZE in a static_assert()
instead of runtime.
Only check if !USE_HOSTCC (for in fw_env tool ENV_SIZE expands to a
variable, and cannot be checked statically) nad
!DEFAULT_ENV_INSTANCE_EMBEDDED, for in that case the default_environment
variable is not set.

Signed-off-by: default avatarMarek Behún <marek.behun@nic.cz>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent c5cbbe35
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment