diff options
author | Sam Morris <sam@robots.org.uk> | 2019-01-09 10:15:53 +0000 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-01-10 11:08:42 +0100 |
commit | b26c90411343d74b15deb24bd87077848e316dab (patch) | |
tree | 4379707a38479aae6e472b146692c18ed470dd97 /src/test/test-fs-util.c | |
parent | a1b939dfc74f1f6ac8e8ad41912ac322b5e2438c (diff) | |
download | systemd-b26c90411343d74b15deb24bd87077848e316dab.tar.gz |
nss: prevent PROTECT_ERRNO from squashing changes to *errnop
glibc passes in &errno for errnop, which means PROTECT_ERRNO ends up
squashing our intentional changes to *errnop.
Fixes #11321.
Diffstat (limited to 'src/test/test-fs-util.c')
-rw-r--r-- | src/test/test-fs-util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test-fs-util.c b/src/test/test-fs-util.c index b3a4b1749c..e049abc4a4 100644 --- a/src/test/test-fs-util.c +++ b/src/test/test-fs-util.c @@ -361,11 +361,11 @@ static void test_unlink_noerrno(void) { { PROTECT_ERRNO; - errno = -42; + errno = 42; assert_se(unlink_noerrno(name) >= 0); - assert_se(errno == -42); + assert_se(errno == 42); assert_se(unlink_noerrno(name) < 0); - assert_se(errno == -42); + assert_se(errno == 42); } } |