(cons_choose): Clean up somewhat dirty use of union pointers that's

not quite blessed by the standard and prone to trigger compiler
warnings.
This commit is contained in:
Markus Armbruster 2004-02-19 21:03:57 +00:00
parent 6482ed03d1
commit c54149ef39

View file

@ -111,7 +111,6 @@ static int
cons_choose(struct ltcomstr *ltcp)
{
s_char *p;
int (*dis)();
struct lonstr *lp;
struct trtstr *tp;
s_char prompt[128];
@ -148,7 +147,9 @@ cons_choose(struct ltcomstr *ltcp)
if ((ltcp->num = onearg(player->argp[2], prompt)) < 0)
return RET_SYN;
if (!ef_read(ltcp->type, ltcp->num, (caddr_t)&ltcp->u) ||
!(*dis) (ltcp->num, &ltcp->u)) {
!(ltcp->type == EF_TREATY
? distrea(ltcp->num, ltcp->u.t)
: disloan(ltcp->num, ltcp->u.l))) {
pr("%s #%d is not being offered to you!\n", ltcp->Name, ltcp->num);
return RET_SYN;
}