summaryrefslogtreecommitdiffstats
path: root/usr.sbin/named/db_glue.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/named/db_glue.c')
-rw-r--r--usr.sbin/named/db_glue.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/named/db_glue.c b/usr.sbin/named/db_glue.c
index 17d6085..3321c96 100644
--- a/usr.sbin/named/db_glue.c
+++ b/usr.sbin/named/db_glue.c
@@ -1,6 +1,6 @@
#if !defined(lint) && !defined(SABER)
static char sccsid[] = "@(#)db_glue.c 4.4 (Berkeley) 6/1/90";
-static char rcsid[] = "$Id: db_glue.c,v 1.2 1995/05/30 03:48:39 rgrimes Exp $";
+static char rcsid[] = "$Id: db_glue.c,v 1.3 1995/08/20 21:18:19 peter Exp $";
#endif /* not lint */
/*
@@ -1179,14 +1179,17 @@ ctimel(l)
/*
* This is nec'y for systems that croak when deref'ing unaligned pointers.
- * SPARC is an example.
+ * SPARC is an example. Note that in_addr.s_addr needn't be a 32-bit int,
+ * so we want to avoid bcopy and let the compiler do the casting for us.
*/
struct in_addr
data_inaddr(data)
const u_char *data;
{
struct in_addr ret;
+ u_int32_t tmp;
- bcopy((char *)data, (char *)&ret, INADDRSZ);
+ bcopy((char *)data, (char *)&tmp, INADDRSZ);
+ ret.s_addr = tmp;
return (ret);
}
OpenPOWER on IntegriCloud