]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
Don't suggest putting values in an enum that are not in the enum.
authorJilles Tjoelker <redacted>
Wed, 28 Jan 2009 00:02:34 +0000 (01:02 +0100)
committerJilles Tjoelker <redacted>
Wed, 28 Jan 2009 00:02:34 +0000 (01:02 +0100)
Compilers may assume that variables of enumerated type
only contain values in the enumeration.

include/privilege.h

index 46d5cd93675094f09c52a3a02a31b05cf9c77709..a3e5bffb4dccf883bcdfda72cf3791e0ccc5ac24 100644 (file)
 
 #include "stdinc.h"
 
-typedef enum {
+enum {
        PRIV_NEEDOPER = 1
-} PrivilegeFlags;
+};
+typedef unsigned int PrivilegeFlags;
 
 struct PrivilegeSet {
        unsigned int status;    /* If CONF_ILLEGAL, delete when no refs */