NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lib/46008: ANSIfy setmode.c
>Number: 46008
>Category: lib
>Synopsis: ANSIfy setmode.c
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Feb 12 12:10:00 +0000 2012
>Originator: Henning Petersen
>Release:
>Organization:
>Environment:
ANSIfy setmode.c.
>Description:
>How-To-Repeat:
>Fix:
diff -u -p -r1.31 setmode.c
--- lib/libc/gen/setmode.c 1 Oct 2005 20:08:01 -0000 1.31
+++ lib/libc/gen/setmode.c 5 Feb 2012 11:48:45 -0000
@@ -77,10 +77,10 @@ typedef struct bitcmd {
#define CMD2_OBITS 0x08
#define CMD2_UBITS 0x10
-static BITCMD *addcmd __P((BITCMD *, mode_t, mode_t, mode_t, mode_t));
-static void compress_mode __P((BITCMD *));
+static BITCMD *addcmd (BITCMD *, mode_t, mode_t, mode_t, mode_t);
+static void compress_mode (BITCMD *);
#ifdef SETMODE_DEBUG
-static void dumpmode __P((BITCMD *));
+static void dumpmode (BITCMD *);
#endif
/*
@@ -90,9 +90,7 @@ static void dumpmode __P((BITCMD *));
* bits) followed by a '+' (set bits).
*/
mode_t
-getmode(bbox, omode)
- const void *bbox;
- mode_t omode;
+getmode(const void *bbox, mode_t omode)
{
const BITCMD *set;
mode_t clrval, newmode, value;
@@ -178,8 +176,7 @@ common: if (set->cmd2 & CMD2_CLR) {
#define STANDARD_BITS (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO)
void *
-setmode(p)
- const char *p;
+setmode(const char *p)
{
int serrno;
char op, *ep;
@@ -367,9 +364,7 @@ out:
}
static BITCMD *
-addcmd(set, op, who, oparg, mask)
- BITCMD *set;
- mode_t oparg, who, op, mask;
+addcmd(BITCMD *set, mode_t op, mode_t who, mode_t oparg, mode_t mask)
{
_DIAGASSERT(set != NULL);
@@ -416,8 +411,7 @@ addcmd(set, op, who, oparg, mask)
#ifdef SETMODE_DEBUG
static void
-dumpmode(set)
- BITCMD *set;
+dumpmode(BITCMD *set)
{
_DIAGASSERT(set != NULL);
@@ -440,8 +434,7 @@ dumpmode(set)
* compacted, but it's not worth the effort.
*/
static void
-compress_mode(set)
- BITCMD *set;
+compress_mode(BITCMD *set)
{
BITCMD *nset;
int setbits, clrbits, Xbits, op;
Home |
Main Index |
Thread Index |
Old Index