Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/net add explicit casts



details:   https://anonhg.NetBSD.org/src/rev/645518dfb3f3
branches:  trunk
changeset: 494394:645518dfb3f3
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jul 06 02:59:47 2000 +0000

description:
add explicit casts

diffstat:

 lib/libc/net/res_comp.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 5a93347b6ac3 -r 645518dfb3f3 lib/libc/net/res_comp.c
--- a/lib/libc/net/res_comp.c   Thu Jul 06 02:59:20 2000 +0000
+++ b/lib/libc/net/res_comp.c   Thu Jul 06 02:59:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: res_comp.c,v 1.18 2000/04/25 14:39:00 itojun Exp $     */
+/*     $NetBSD: res_comp.c,v 1.19 2000/07/06 02:59:47 christos Exp $   */
 
 /*-
  * Copyright (c) 1985, 1993
@@ -59,7 +59,7 @@
 static char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93";
 static char rcsid[] = "Id: res_comp.c,v 8.14 1998/05/11 04:19:47 vixie Exp ";
 #else
-__RCSID("$NetBSD: res_comp.c,v 1.18 2000/04/25 14:39:00 itojun Exp $");
+__RCSID("$NetBSD: res_comp.c,v 1.19 2000/07/06 02:59:47 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -618,7 +618,7 @@
                        }
                        checked += n + 1;
                        *dstp++ = n;
-                       memcpy(dstp, srcp, n);
+                       memcpy(dstp, srcp, (size_t)n);
                        dstp += n;
                        srcp += n;
                        break;
@@ -749,7 +749,7 @@
                        errno = EMSGSIZE;
                        return (-1);
                }
-               memcpy(dstp, srcp, n + 1);
+               memcpy(dstp, srcp, (size_t)(n + 1));
                srcp += n + 1;
                dstp += n + 1;
        } while (n != 0);



Home | Main Index | Thread Index | Old Index