Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/installboot/arch Use to htobe16, not htons



details:   https://anonhg.NetBSD.org/src/rev/51842fa20d86
branches:  trunk
changeset: 532071:51842fa20d86
user:      matt <matt%NetBSD.org@localhost>
date:      Fri May 31 05:54:36 2002 +0000

description:
Use to htobe16, not htons

diffstat:

 usr.sbin/installboot/arch/alpha.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r fc16cac1579b -r 51842fa20d86 usr.sbin/installboot/arch/alpha.c
--- a/usr.sbin/installboot/arch/alpha.c Fri May 31 05:50:03 2002 +0000
+++ b/usr.sbin/installboot/arch/alpha.c Fri May 31 05:54:36 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: alpha.c,v 1.11 2002/05/15 02:18:23 lukem Exp $ */
+/*     $NetBSD: alpha.c,v 1.12 2002/05/31 05:54:36 matt Exp $  */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -98,7 +98,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: alpha.c,v 1.11 2002/05/15 02:18:23 lukem Exp $");
+__RCSID("$NetBSD: alpha.c,v 1.12 2002/05/31 05:54:36 matt Exp $");
 #endif /* !__lint */
 
 #if HAVE_CONFIG_H
@@ -431,7 +431,7 @@
        /*
         * Make alpha checksum <47:32> come out to the sun magic.
         */
-       bb16[BB_ADJUST_OFFSET + 2] = htons(SUN_DKMAGIC) - bb16[254];
+       bb16[BB_ADJUST_OFFSET + 2] = htobe16(SUN_DKMAGIC) - bb16[254];
        resum(params, bb, bb16);
        sunsum = compute_sunsum(bb16);          /* might be the final value */
        if (params->flags & IB_VERBOSE)
@@ -474,7 +474,7 @@
        memcpy(bb16, bb, sizeof(bb16));
        if (compute_sunsum(bb16) != bb16[255])
                warnx(wmsg, when, "checksum", bb16[255], compute_sunsum(bb16));
-       if (bb16[254] != htons(SUN_DKMAGIC))
+       if (bb16[254] != htobe16(SUN_DKMAGIC))
                warnx(wmsg, when, "magic number", bb16[254],
-                   htons(SUN_DKMAGIC));
+                   htobe16(SUN_DKMAGIC));
 }



Home | Main Index | Thread Index | Old Index