Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/dhcp/client Address LP64 issues (just add some cast...



details:   https://anonhg.NetBSD.org/src/rev/07ca05930aa4
branches:  trunk
changeset: 485268:07ca05930aa4
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Apr 23 18:39:00 2000 +0000

description:
Address LP64 issues (just add some casts; the code is safe).

diffstat:

 usr.sbin/dhcp/client/clparse.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r da5c6776ffb5 -r 07ca05930aa4 usr.sbin/dhcp/client/clparse.c
--- a/usr.sbin/dhcp/client/clparse.c    Sun Apr 23 18:26:42 2000 +0000
+++ b/usr.sbin/dhcp/client/clparse.c    Sun Apr 23 18:39:00 2000 +0000
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: clparse.c,v 1.1.1.8 2000/04/22 07:11:29 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: clparse.c,v 1.2 2000/04/23 18:39:00 thorpej Exp $ Copyright (c) 1996-2000 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -587,7 +587,7 @@
                r = new_pair (MDL);
                if (!r)
                        log_fatal ("can't allocate pair for option code.");
-               r -> car = (caddr_t)i;
+               r -> car = (caddr_t) ((unsigned long) i);
                r -> cdr = (pair)0;
                if (p)
                        q -> cdr = r;
@@ -611,7 +611,8 @@
                else {
                        ix = 0;
                        for (q = p; q; q = q -> cdr)
-                               (*list) [ix++] = (u_int32_t)q -> car;
+                               (*list) [ix++] =
+                                   (u_int32_t) ((unsigned long) q -> car);
                        (*list) [ix] = 0;
                }
                while (p) {



Home | Main Index | Thread Index | Old Index