OSSP CVS Repository

ossp - Check-in [865]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 865
Date: 2001-Sep-05 16:10:00 (local)
2001-Sep-05 14:10:00 (UTC)
User:thl
Branch:
Comment: fix bit-check
Tickets:
Inspections:
Files:
ossp-pkg/l2/l2_stream.c      1.12 -> 1.13     3 inserted, 2 deleted

ossp-pkg/l2/l2_stream.c 1.12 -> 1.13

--- l2_stream.c  2001/09/05 13:33:55     1.12
+++ l2_stream.c  2001/09/05 14:10:00     1.13
@@ -158,14 +158,15 @@
 
     /* make sure only a single level is specified */
     for (l = level, j = 0; l != 0; l = (l >> 1))
-        j++;
+        if (l & 0x1)
+            j++;
     if (j != 1)
         return L2_ERROR;
 
     /* check whether level is globally enabled */
     if (!(st->levelmask & level))
         return L2_OK;
-    
+
     /* format message */
     vfmt.curpos = st->message;
     vfmt.endpos = st->message + L2_MAX_MSGSIZE;

CVSTrac 2.0.1