From 9e08948192dec57de4c38097d58f301dec7d6b5d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 27 Dec 2015 22:17:10 +0100 Subject: fix errors and warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/slibc-human/machinemode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/slibc-human/machinemode.c') diff --git a/src/slibc-human/machinemode.c b/src/slibc-human/machinemode.c index 0dceddf..fc11ea9 100644 --- a/src/slibc-human/machinemode.c +++ b/src/slibc-human/machinemode.c @@ -73,7 +73,7 @@ * 1=can write, 2=can execute/list, 3=can execute/list or/and * special, 4=special} to permissions bits map. */ -static mode_t bits[][] = { +static mode_t bits[][5] = { {S_IRUSR, S_IWUSR, S_IXUSR, S_ISUSR, S_ISUID}, {S_IRGRP, S_IWGRP, S_IXGRP, S_ISGRP, S_ISGID}, {S_IROTH, S_IWOTH, S_IXOTH, S_ISOTH, S_ISVTX}, @@ -120,7 +120,7 @@ static inline int partial_symbolic(mode_t* restrict mode, mode_t* restrict mask, /* Get permissions. */ for (partial_or = 0; *str && (*str != ','); str++) for (user = first; user < last; user++) - BITS(*str, partial_or, j); + BITS(*str, partial_or, user); /* Apply permissions. */ if (symbol != '-') or |= partial_or; -- cgit v1.2.3-70-g09d2