Correct mistakes I made when getting rid of lvalue casts.

This commit is contained in:
he 2006-06-11 08:35:00 +00:00
parent 34155cf541
commit 9c72169b1f
1 changed files with 8 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_le.c,v 1.9 2006/06/08 07:03:11 he Exp $ */
/* $NetBSD: if_le.c,v 1.10 2006/06/11 08:35:00 he Exp $ */
/*
* Copyright (c) 1997, 1999 Ludd, University of Lule}, Sweden.
* All rights reserved.
@ -65,7 +65,7 @@
#define NRBUF (1 << RLEN)
#define BUFSIZE 1518
#define QW_ALLOC(x) (((int)alloc((x) + 7) + 7) & ~7)
#define QW_ALLOC(x) (((uintptr_t)alloc((x) + 7) + 7) & ~7)
static int le_get(struct iodesc *, void *, size_t, time_t);
static int le_put(struct iodesc *, void *, size_t);
@ -169,21 +169,20 @@ igen:
eaddr[i] = ea[i] & 0377;
if (initblock == NULL) {
initblock =
(struct initblock *)QW_ALLOC(sizeof(struct initblock)) +
addoff;
initblock = (struct initblock *)
(QW_ALLOC(sizeof(struct initblock)) + addoff);
initblock->ib_mode = LE_MODE_NORMAL;
bcopy(eaddr, initblock->ib_padr, 6);
initblock->ib_ladrf1 = 0;
initblock->ib_ladrf2 = 0;
rdesc = (struct buffdesc *)QW_ALLOC(sizeof(struct buffdesc) *
NRBUF) + addoff;
rdesc = (struct buffdesc *)
(QW_ALLOC(sizeof(struct buffdesc) * NRBUF) + addoff);
initblock->ib_rdr = (RLEN << 29) | (int)rdesc;
if (kopiera)
initblock->ib_rdr -= (int)initblock;
tdesc = (struct buffdesc *)QW_ALLOC(sizeof(struct buffdesc) *
NTBUF) + addoff;
tdesc = (struct buffdesc *)
(QW_ALLOC(sizeof(struct buffdesc) * NTBUF) + addoff);
initblock->ib_tdr = (TLEN << 29) | (int)tdesc;
if (kopiera)
initblock->ib_tdr -= (int)initblock;