Get rid of an instance of lvalue casts by using a pair of helper vars.
This commit is contained in:
parent
9bc6aa0193
commit
d3056ebc9a
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: macrom.c,v 1.59 2005/12/24 20:07:15 perry Exp $ */
|
/* $NetBSD: macrom.c,v 1.60 2006/06/07 11:29:56 he Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (C) 1994 Bradley A. Grantham
|
* Copyright (C) 1994 Bradley A. Grantham
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: macrom.c,v 1.59 2005/12/24 20:07:15 perry Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: macrom.c,v 1.60 2006/06/07 11:29:56 he Exp $");
|
||||||
|
|
||||||
#include "opt_adb.h"
|
#include "opt_adb.h"
|
||||||
#include "opt_ddb.h"
|
#include "opt_ddb.h"
|
||||||
|
@ -174,14 +174,17 @@ void
|
||||||
mrg_DTInstall(void)
|
mrg_DTInstall(void)
|
||||||
{
|
{
|
||||||
caddr_t ptr, prev;
|
caddr_t ptr, prev;
|
||||||
|
caddr_t *cptr, *cprev;
|
||||||
|
|
||||||
__asm volatile ("movl %%a0,%0" : "=g" (ptr));
|
__asm volatile ("movl %%a0,%0" : "=g" (ptr));
|
||||||
|
|
||||||
(caddr_t *)prev = &mrg_DTList;
|
prev = (caddr_t)&mrg_DTList;
|
||||||
while (*(caddr_t *)prev != NULL)
|
while (*(caddr_t *)prev != NULL)
|
||||||
prev = *(caddr_t *)prev;
|
prev = *(caddr_t *)prev;
|
||||||
*(caddr_t *)ptr = NULL;
|
cptr = (caddr_t *)ptr;
|
||||||
*(caddr_t *)prev = ptr;
|
cprev = (caddr_t *)prev;
|
||||||
|
*cptr = NULL;
|
||||||
|
*cprev = ptr;
|
||||||
setsoftdtmgr();
|
setsoftdtmgr();
|
||||||
|
|
||||||
__asm volatile ("clrl %%d0" : : : "d0");
|
__asm volatile ("clrl %%d0" : : : "d0");
|
||||||
|
|
Loading…
Reference in New Issue