Clean up casts from struct FOO * to struct emp_qelem *
Take the address of the queue member instead. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
4d899f6e6d
commit
52a40481cb
4 changed files with 10 additions and 10 deletions
|
@ -107,7 +107,7 @@ ground_interdict(coord x, coord y, natid victim, char *s)
|
|||
act[0] = 0;
|
||||
for (cn = 1; cn < MAXNOC; cn++) {
|
||||
act[cn] = relations_with(cn, victim) <= HOSTILE;
|
||||
emp_initque((struct emp_qelem *)&mi[cn]);
|
||||
emp_initque(&mi[cn].queue);
|
||||
}
|
||||
|
||||
build_mission_list(mi, act, act, x, y, MI_INTERDICT);
|
||||
|
@ -192,7 +192,7 @@ unit_interdict(coord x, coord y, natid victim, char *s, int hardtarget,
|
|||
other_act[cn] = rel <= HOSTILE;
|
||||
plane_act[cn] = mission == MI_SINTERDICT
|
||||
? rel <= NEUTRAL : other_act[cn];
|
||||
emp_initque((struct emp_qelem *)&mi[cn]);
|
||||
emp_initque(&mi[cn].queue);
|
||||
}
|
||||
|
||||
build_mission_list(mi, other_act, plane_act, x, y, mission);
|
||||
|
@ -250,7 +250,7 @@ dosupport(coord x, coord y, natid victim, natid actee, int mission)
|
|||
act[0] = 0;
|
||||
for (cn = 1; cn < MAXNOC; cn++) {
|
||||
act[cn] = feels_like_helping(cn, actee, victim);
|
||||
emp_initque((struct emp_qelem *)&mi[cn]);
|
||||
emp_initque(&mi[cn].queue);
|
||||
}
|
||||
|
||||
build_mission_list(mi, act, act, x, y, MI_SUPPORT);
|
||||
|
@ -992,7 +992,7 @@ add_airport(struct emp_qelem *airp, coord x, coord y)
|
|||
getsect(x, y, §);
|
||||
a->own = sect.sct_own;
|
||||
|
||||
emp_insque((struct emp_qelem *)a, airp);
|
||||
emp_insque(&a->queue, airp);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue