summaryrefslogtreecommitdiff
path: root/src/hexen
diff options
context:
space:
mode:
Diffstat (limited to 'src/hexen')
-rw-r--r--src/hexen/am_map.c4
-rw-r--r--src/hexen/ct_chat.c2
-rw-r--r--src/hexen/d_net.c6
-rw-r--r--src/hexen/h2_main.c4
4 files changed, 9 insertions, 7 deletions
diff --git a/src/hexen/am_map.c b/src/hexen/am_map.c
index b3744736..be16a8ac 100644
--- a/src/hexen/am_map.c
+++ b/src/hexen/am_map.c
@@ -703,8 +703,8 @@ boolean AM_clipMline(mline_t * ml, fline_t * fl)
{
enum
{ LEFT = 1, RIGHT = 2, BOTTOM = 4, TOP = 8 };
- register outcode1 = 0, outcode2 = 0, outside;
- fpoint_t tmp;
+ int outcode1 = 0, outcode2 = 0, outside;
+ fpoint_t tmp = { 0, 0 };
int dx, dy;
#define DOOUTCODE(oc, mx, my) \
diff --git a/src/hexen/ct_chat.c b/src/hexen/ct_chat.c
index cd721273..3e16a567 100644
--- a/src/hexen/ct_chat.c
+++ b/src/hexen/ct_chat.c
@@ -412,7 +412,7 @@ void CT_Drawer(void)
void CT_queueChatChar(char ch)
{
- if ((tail + 1) & (QUEUESIZE - 1) == head)
+ if (((tail + 1) & (QUEUESIZE - 1)) == head)
{ // the queue is full
return;
}
diff --git a/src/hexen/d_net.c b/src/hexen/d_net.c
index 18d50774..f7381d4e 100644
--- a/src/hexen/d_net.c
+++ b/src/hexen/d_net.c
@@ -517,7 +517,7 @@ void CheckAbort(void)
I_StartTic();
for (; eventtail != eventhead;
- eventtail = (++eventtail) & (MAXEVENTS - 1))
+ eventtail = (eventtail + 1) & (MAXEVENTS - 1))
{
ev = &events[eventtail];
if (ev->type == ev_keydown && ev->data1 == KEY_ESCAPE)
@@ -722,7 +722,9 @@ void D_CheckNetGame(void)
netbuffer = &doomcom->data;
consoleplayer = displayplayer = doomcom->consoleplayer;
pClass = PCLASS_FIGHTER;
- if (i = M_CheckParm("-class"))
+ i = M_CheckParm("-class");
+
+ if (i > 0)
{
pClass = atoi(myargv[i + 1]);
if (pClass > PCLASS_MAGE || pClass < PCLASS_FIGHTER)
diff --git a/src/hexen/h2_main.c b/src/hexen/h2_main.c
index 2313b463..60ae9f64 100644
--- a/src/hexen/h2_main.c
+++ b/src/hexen/h2_main.c
@@ -536,7 +536,7 @@ void H2_ProcessEvents(void)
event_t *ev;
for (; eventtail != eventhead;
- eventtail = (++eventtail) & (MAXEVENTS - 1))
+ eventtail = (eventtail + 1) & (MAXEVENTS - 1))
{
ev = &events[eventtail];
if (F_Responder(ev))
@@ -562,7 +562,7 @@ void H2_ProcessEvents(void)
void H2_PostEvent(event_t * ev)
{
events[eventhead] = *ev;
- eventhead = (++eventhead) & (MAXEVENTS - 1);
+ eventhead = (eventhead + 1) & (MAXEVENTS - 1);
}
//==========================================================================