]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-execute: avoid undefined variable warning when compiled w/o seccomp 11918/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 7 Mar 2019 09:56:38 +0000 (10:56 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 7 Mar 2019 09:59:06 +0000 (10:59 +0100)
src/test/test-execute.c

index 195711215938dcc69cd9a6743a5742d49cbf5c5e..b34b207a40824740f6cf79da52611bd30209dc56 100644 (file)
@@ -714,7 +714,6 @@ static int run_tests(UnitFileScope scope, const test_function_t *tests) {
 int main(int argc, char *argv[]) {
         _cleanup_(rm_rf_physical_and_freep) char *runtime_dir = NULL;
         _cleanup_free_ char *test_execute_path = NULL;
-        _cleanup_hashmap_free_ Hashmap *s = NULL;
         static const test_function_t user_tests[] = {
                 test_exec_basic,
                 test_exec_ambientcapabilities,
@@ -812,6 +811,7 @@ int main(int argc, char *argv[]) {
                 return 0;
         }
 
+        _cleanup_hashmap_free_ Hashmap *s = NULL;
         assert_se(s = hashmap_new(NULL));
         r = seccomp_syscall_resolve_name("unshare");
         assert_se(r != __NR_SCMP_ERROR);