From a99bcbf9168ddd17fc172f909ee0ed32b4232dfc Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Thu, 14 Apr 2016 23:53:08 +0000 Subject: [PATCH] Fix decoding of 16-bit uid_t/git_t * uid.c (printuid): Always cast value to uid_t. --- uid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uid.c b/uid.c index c8723924..f5712a2f 100644 --- a/uid.c +++ b/uid.c @@ -148,10 +148,10 @@ SYS_FUNC(fchown) void printuid(const char *text, const unsigned int uid) { - if ((unsigned int) -1 == uid || (uid_t) -1 == uid) + if ((uid_t) -1U == (uid_t) uid) tprintf("%s-1", text); else - tprintf("%s%u", text, uid); + tprintf("%s%u", text, (uid_t) uid); } SYS_FUNC(setgroups) -- 2.50.1