Module Name: src Committed By: mrg Date: Thu Jul 7 01:26:55 UTC 2011
Modified Files: src/sys/arch/macppc/stand/ofwboot: ofdev.c Log Message: avoid a multi-level cast issue To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/macppc/stand/ofwboot/ofdev.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/macppc/stand/ofwboot/ofdev.c diff -u src/sys/arch/macppc/stand/ofwboot/ofdev.c:1.23 src/sys/arch/macppc/stand/ofwboot/ofdev.c:1.24 --- src/sys/arch/macppc/stand/ofwboot/ofdev.c:1.23 Sun Oct 17 15:33:04 2010 +++ src/sys/arch/macppc/stand/ofwboot/ofdev.c Thu Jul 7 01:26:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ofdev.c,v 1.23 2010/10/17 15:33:04 phx Exp $ */ +/* $NetBSD: ofdev.c,v 1.24 2011/07/07 01:26:55 mrg Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -439,7 +439,9 @@ || nread != DEV_BSIZE || getdisklabel(buf, &label)) { /* Else try APM or MBR partitions */ - if (((struct drvr_map *)buf)->sbSig == DRIVER_MAP_MAGIC) + struct drvr_map *map = (struct drvr_map *)buf; + + if (map->sbSig == DRIVER_MAP_MAGIC) error = search_mac_label(&ofdev, buf, &label); else error = search_dos_label(&ofdev, 0, buf,