Clean up casts from union empobj_storage * to struct empobj *

Take the address of member gen instead.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2014-01-25 11:25:43 +01:00
parent 52a40481cb
commit c274d0820c
2 changed files with 3 additions and 3 deletions

View file

@ -165,7 +165,7 @@ mission(void)
radius = 9999;
while (nxtitem(&ni, &item)) {
gp = (struct empobj *)&item;
gp = &item.gen;
if (!player->owner || gp->own == 0)
continue;
@ -300,7 +300,7 @@ show_mission(struct nstr_item *np)
struct empobj *gp;
while (nxtitem(np, &item)) {
gp = (struct empobj *)&item;
gp = &item.gen;
if (!player->owner || gp->own == 0)
continue;

View file

@ -289,7 +289,7 @@ build_mission_list_type(struct genlist mi[], unsigned char act[],
snxtitem_all(&ni, type);
while (nxtitem(&ni, &item)) {
gp = (struct empobj *)&item;
gp = &item.gen;
if (!act[gp->own])
continue;