Skip to content

Commit

Permalink
Use C11 anonymous unions.
Browse files Browse the repository at this point in the history
PR:		215202
Reported by:	glebius
MFC after:	2 weeks
  • Loading branch information
lemul committed Jun 10, 2019
1 parent fdb916d commit a5ec4a9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sys/sys/ucred.h
Expand Up @@ -89,12 +89,11 @@ struct xucred {
gid_t cr_groups[XU_NGROUPS]; /* groups */
union {
void *_cr_unused1; /* compatibility with old ucred */
pid_t _pid;
} _cr;
pid_t cr_pid;
};
};
#define XUCRED_VERSION 0

#define cr_pid _cr._pid
/* This can be used for both ucred and xucred structures. */
#define cr_gid cr_groups[0]

Expand Down

0 comments on commit a5ec4a9

Please sign in to comment.