osezer patch 006
authorDan Olson <theoddone33@icculus.org>
Wed, 23 Apr 2008 10:25:01 +0000 (03:25 -0700)
committerDan Olson <theoddone33@icculus.org>
Wed, 23 Apr 2008 10:25:01 +0000 (03:25 -0700)
fixed warnings

base/d_net.c
base/h2_main.c

index 46747c0..6462828 100644 (file)
@@ -503,12 +503,12 @@ void CheckAbort (void)
                I_StartTic ();
 
        I_StartTic ();
-       for ( ; eventtail != eventhead
-       ; eventtail = (++eventtail)&(MAXEVENTS-1) )
+       while (eventtail != eventhead)
        {
                ev = &events[eventtail];
                if (ev->type == ev_keydown && ev->data1 == KEY_ESCAPE)
                        I_Error ("Network game synchronization aborted.");
+               eventtail = (eventtail + 1) & (MAXEVENTS - 1);
        }
 }
 
index e8f156d..0939085 100644 (file)
@@ -571,18 +571,20 @@ void H2_ProcessEvents(void)
 {
        event_t *ev;
 
-       for(; eventtail != eventhead; eventtail = (++eventtail)&(MAXEVENTS-1))
+       while (eventtail != eventhead)
        {
                ev = &events[eventtail];
                if(F_Responder(ev))
                {
-                       continue;
+                       goto _next_ev;
                }
                if(MN_Responder(ev))
                {
-                       continue;
+                       goto _next_ev;
                }
                G_Responder(ev);
+       _next_ev:
+               eventtail = (eventtail + 1) & (MAXEVENTS - 1);
        }
 }