commit | adb431e79b83280c4a62bb336336ce8484bf549a | [log] [tgz] |
---|---|---|
author | Marek BehĂșn <marek.behun@nic.cz> | Fri Oct 22 15:47:25 2021 +0200 |
committer | Simon Glass <sjg@chromium.org> | Sun Oct 31 12:26:44 2021 -0600 |
tree | cca121da9f5283677ccfc3097b2711ddf298f463 | |
parent | 73d2534e6f50444d826857213676c0bb1ee2a36c [diff] |
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: Marek BehĂșn <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org>