From: Zbigniew Jędrzejewski-Szmek Date: Thu, 28 Mar 2019 08:35:26 +0000 (+0100) Subject: test-terminal-util: fix sigsegv when compiled without asserts X-Git-Tag: v242-rc1~51^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b1e405f36945be7873490e2cf59cfa558317ad3;p=thirdparty%2Fsystemd.git test-terminal-util: fix sigsegv when compiled without asserts I couldn't figure out what is going on here, because LTO inlines everything and then the backtrace reported a different spot. But when compiled with NDEBUG but no LTO, it's fairly obvious ;) C.f. #12008. --- diff --git a/src/test/test-terminal-util.c b/src/test/test-terminal-util.c index f063d1d5604..96d92279fbf 100644 --- a/src/test/test-terminal-util.c +++ b/src/test/test-terminal-util.c @@ -40,7 +40,7 @@ static void test_read_one_char(void) { log_info("/* %s */", __func__); - assert(fmkostemp_safe(name, "r+", &file) == 0); + assert_se(fmkostemp_safe(name, "r+", &file) == 0); assert_se(fputs("c\n", file) >= 0); rewind(file);