Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2004-08-25 00:36:08 UTC

Modified files:
     include/client.h ChangeLog

Log message:

Fix bug in flag checking discovered by ratty

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.443 ircu2.10/ChangeLog:1.444
--- ircu2.10/ChangeLog:1.443    Sun Aug 22 16:54:22 2004
+++ ircu2.10/ChangeLog  Tue Aug 24 17:35:58 2004
@@ -1,3 +1,8 @@
+2004-08-24  Michael Poole <[EMAIL PROTECTED]>
+
+       * ircd/client.h: Properly parenthesize "flag" argument to
+       FLAGSET_INDEX() and FLAGSET_MASK() macros.
+
 2004-08-22  Michael Poole <[EMAIL PROTECTED]>
 
        * ircd/channel.c (send_channel_modes): If oplevels are disabled,
Index: ircu2.10/include/client.h
diff -u ircu2.10/include/client.h:1.35 ircu2.10/include/client.h:1.36
--- ircu2.10/include/client.h:1.35      Wed Aug 18 21:00:47 2004
+++ ircu2.10/include/client.h   Tue Aug 24 17:35:57 2004
@@ -18,7 +18,7 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
  *
- * $Id: client.h,v 1.35 2004/08/19 04:00:47 entrope Exp $
+ * $Id: client.h,v 1.36 2004/08/25 00:35:57 entrope Exp $
  */
 #ifndef INCLUDED_client_h
 #define INCLUDED_client_h
@@ -67,8 +67,8 @@
 typedef unsigned long flagpage_t;
 
 #define FLAGSET_NBITS (8 * sizeof(flagpage_t))
-#define FLAGSET_INDEX(flag) (flag / FLAGSET_NBITS)
-#define FLAGSET_MASK(flag) (1<<(flag % FLAGSET_NBITS))
+#define FLAGSET_INDEX(flag) ((flag) / FLAGSET_NBITS)
+#define FLAGSET_MASK(flag) (1<<((flag) % FLAGSET_NBITS))
 
 #define DECLARE_FLAGSET(name,max) \
   struct name \
----------------------- End of diff -----------------------

Reply via email to