commit: 3ddaca746855efb229595738f33a9ba00e8f001b
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 18 06:33:10 2021 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Oct 18 06:33:10 2021 +0000
URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=3ddaca74
libsbutil: add assert to testing code path
This makes it more obvious when the env is (incorrectly) partially setup.
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
libsbutil/get_sandbox_conf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libsbutil/get_sandbox_conf.c b/libsbutil/get_sandbox_conf.c
index af0140e..1178f8a 100644
--- a/libsbutil/get_sandbox_conf.c
+++ b/libsbutil/get_sandbox_conf.c
@@ -19,6 +19,7 @@ char *get_sandbox_conf(void)
save_errno();
if (is_env_on(ENV_SANDBOX_TESTING)) {
char *abs = getenv("abs_top_srcdir");
+ sb_assert(abs != NULL);
ret = xmalloc(strlen(abs) + strlen(LOCAL_SANDBOX_CONF_FILE) +
1);
sprintf(ret, "%s%s", abs, LOCAL_SANDBOX_CONF_FILE);
}