Get rid off the ugly S_SIZE() macro which breaks the build now that
bcmp() is a macro, too.
This commit is contained in:
parent
ad5e78548c
commit
8ff1e4e407
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pxe.c,v 1.6 2003/03/12 17:33:10 drochner Exp $ */
|
||||
/* $NetBSD: pxe.c,v 1.7 2005/06/14 18:25:16 tron Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2001 Wasabi Systems, Inc.
|
||||
|
@ -314,7 +314,7 @@ pxe_init(void)
|
|||
for (cp = (char *)0xa0000; cp > (char *)0x10000; cp -= 2) {
|
||||
if (pxenv == NULL) {
|
||||
pxenv = (pxenv_t *)cp;
|
||||
if (bcmp(pxenv->Signature, S_SIZE("PXENV+")))
|
||||
if (MEMSTRCMP(pxenv->Signature, "PXENV+"))
|
||||
pxenv = NULL;
|
||||
else {
|
||||
for (i = 0, ucp = (u_int8_t *)cp, cksum = 0;
|
||||
|
@ -331,7 +331,7 @@ pxe_init(void)
|
|||
|
||||
if (pxe == NULL) {
|
||||
pxe = (pxe_t *)cp;
|
||||
if (bcmp(pxe->Signature, S_SIZE("!PXE")))
|
||||
if (MEMSTRCMP(pxe->Signature, "!PXE"))
|
||||
pxe = NULL;
|
||||
else {
|
||||
for (i = 0, ucp = (u_int8_t *)cp, cksum = 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pxe.h,v 1.2 2003/11/10 08:51:52 wiz Exp $ */
|
||||
/* $NetBSD: pxe.h,v 1.3 2005/06/14 18:25:16 tron Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000 Alfred Perlstein <alfred@freebsd.org>
|
||||
|
@ -35,7 +35,7 @@
|
|||
* the Intel PXE documentation.
|
||||
*/
|
||||
|
||||
#define S_SIZE(s) s, sizeof(s) - 1
|
||||
#define MEMSTRCMP(p, s) memcmp((p), (s), sizeof(s) - 1)
|
||||
|
||||
#define IP_STR "%d.%d.%d.%d"
|
||||
#define IP_ARGS(ip) \
|
||||
|
|
Loading…
Reference in New Issue