diff options
Diffstat (limited to 'lib/libc/gen/setmode.c')
-rw-r--r-- | lib/libc/gen/setmode.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc/gen/setmode.c b/lib/libc/gen/setmode.c index 84cadcb..c69d775 100644 --- a/lib/libc/gen/setmode.c +++ b/lib/libc/gen/setmode.c @@ -67,7 +67,7 @@ typedef struct bitcmd { #define CMD2_UBITS 0x10 static BITCMD *addcmd __P((BITCMD *, int, int, int, u_int)); -static int compress_mode __P((BITCMD *)); +static void compress_mode __P((BITCMD *)); #ifdef SETMODE_DEBUG static void dumpmode __P((BITCMD *)); #endif @@ -172,7 +172,7 @@ setmode(p) BITCMD *set, *saveset, *endset; sigset_t sigset, sigoset; mode_t mask; - int equalopdone, permXbits, setlen; + int equalopdone=0, permXbits, setlen; if (!*p) return (NULL); @@ -190,7 +190,7 @@ setmode(p) (void)sigprocmask(SIG_SETMASK, &sigoset, NULL); setlen = SET_LEN + 2; - + if ((set = malloc((u_int)(sizeof(BITCMD) * setlen))) == NULL) return (NULL); saveset = set; @@ -368,7 +368,7 @@ addcmd(set, op, who, oparg, mask) set->cmd2 = CMD2_UBITS | CMD2_GBITS | CMD2_OBITS; set->bits = mask; } - + if (oparg == '+') set->cmd2 |= CMD2_SET; else if (oparg == '-') @@ -399,10 +399,10 @@ dumpmode(set) /* * Given an array of bitcmd structures, compress by compacting consecutive * '+', '-' and 'X' commands into at most 3 commands, one of each. The 'u', - * 'g' and 'o' commands continue to be separate. They could probably be + * 'g' and 'o' commands continue to be separate. They could probably be * compacted, but it's not worth the effort. */ -static int +static void compress_mode(set) register BITCMD *set; { |