fix tls_align_dlopen
authorSzabolcs Nagy <nsz@port70.net>
Wed, 29 Aug 2018 17:04:25 +0000 (17:04 +0000)
committerSzabolcs Nagy <nsz@port70.net>
Wed, 29 Aug 2018 17:04:25 +0000 (17:04 +0000)
skip further checks after a dlsym failure.

src/functional/tls_align_dlopen.c

index 77a7b93..3f7ae34 100644 (file)
@@ -18,8 +18,7 @@ int main()
        t = dlsym(h, "t");
        if (!t)
                t_error("dlsym failed\n");
        t = dlsym(h, "t");
        if (!t)
                t_error("dlsym failed\n");
-
-       for (i = 0; i < 4; i++) {
+       else for (i = 0; i < 4; i++) {
                if (!t[i].name)
                        t_error("name is not set for t[%d]\n", i);
                if (t[i].addr & (t[i].align-1))
                if (!t[i].name)
                        t_error("name is not set for t[%d]\n", i);
                if (t[i].addr & (t[i].align-1))