summaryrefslogtreecommitdiff
path: root/src/test/test-fs-util.c
diff options
context:
space:
mode:
authorSam Morris <sam@robots.org.uk>2019-01-09 10:15:53 +0000
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-01-10 11:08:42 +0100
commitb26c90411343d74b15deb24bd87077848e316dab (patch)
tree4379707a38479aae6e472b146692c18ed470dd97 /src/test/test-fs-util.c
parenta1b939dfc74f1f6ac8e8ad41912ac322b5e2438c (diff)
downloadsystemd-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.c6
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);
}
}