From 76ca2011c3e74ca916071411375d1df9b926d9b9 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 25 Jan 2014 11:28:05 +0100 Subject: [PATCH] trade: Clean up type of trdswitchown()'s second parameter Signed-off-by: Markus Armbruster --- include/prototypes.h | 2 +- src/lib/commands/trad.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/prototypes.h b/include/prototypes.h index 50518f0c2..cde832c2b 100644 --- a/include/prototypes.h +++ b/include/prototypes.h @@ -70,7 +70,7 @@ extern void plane_sona(struct emp_qelem *, int, int, struct shiplist **); extern char *prsub(struct shpstr *); extern int check_trade(void); extern int ontradingblock(int, void *); -extern void trdswitchown(int, void *, int); +extern void trdswitchown(int, struct empobj *, int); extern int do_look(int); extern void look_at_sect(struct sctstr *, int); extern int radar(int); diff --git a/src/lib/commands/trad.c b/src/lib/commands/trad.c index c3f7c09d1..2c2e4e267 100644 --- a/src/lib/commands/trad.c +++ b/src/lib/commands/trad.c @@ -423,7 +423,7 @@ ontradingblock(int type, void *ptr) } void -trdswitchown(int type, void *ptr, int newown) +trdswitchown(int type, struct empobj *obj, int newown) { struct trdstr trade; union empobj_storage tg; @@ -436,7 +436,7 @@ trdswitchown(int type, void *ptr, int newown) continue; if (trade.trd_type != type) continue; - if (tg.gen.uid != ((struct empobj *)ptr)->uid) + if (tg.gen.uid != obj->uid) continue; if (trade.trd_owner == trade.trd_maxbidder) trade.trd_maxbidder = newown; -- 2.43.0