From 9bb2e6b33e556193aab426d39c55e01e436ebaab Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 10 Apr 2011 09:30:22 +0200 Subject: [PATCH] test-chown.h: correct a cast * tests/test-chown.h (test_chown): Cast -1 to gid_t (not uid_t) when the destination is a stat.st_gid. (cherry picked from commit 5e29a7a095a6c960115cf48f5b28278194a0b2ca) --- ChangeLog | 6 ++++++ tests/test-chown.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b52f24a7b..0290a0d02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-04-10 Jim Meyering + + test-chown.h: correct a cast + * tests/test-chown.h (test_chown): Cast -1 to gid_t (not uid_t) + when the destination is a stat.st_gid. + 2011-04-09 Mats Erik Andersson (tiny change) getaddrinfo: Fix test for sa_len member. diff --git a/tests/test-chown.h b/tests/test-chown.h index 7630de48d..c99ffc1d0 100644 --- a/tests/test-chown.h +++ b/tests/test-chown.h @@ -71,7 +71,7 @@ test_chown (int (*func) (char const *, uid_t, gid_t), bool print) ASSERT (close (creat (BASE "dir/file", 0600)) == 0); ASSERT (stat (BASE "dir/file", &st1) == 0); ASSERT (st1.st_uid != (uid_t) -1); - ASSERT (st1.st_gid != (uid_t) -1); + ASSERT (st1.st_gid != (gid_t) -1); ASSERT (st1.st_gid == getegid ()); /* Sanity check of error cases. */ -- 2.11.0