Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/net Delint.
details: https://anonhg.NetBSD.org/src/rev/188c3949e23f
branches: trunk
changeset: 480908:188c3949e23f
user: mycroft <mycroft%NetBSD.org@localhost>
date: Sun Jan 23 00:01:35 2000 +0000
description:
Delint.
diffstat:
lib/libc/net/ifname.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r 0837e009b6db -r 188c3949e23f lib/libc/net/ifname.c
--- a/lib/libc/net/ifname.c Sat Jan 22 23:54:20 2000 +0000
+++ b/lib/libc/net/ifname.c Sun Jan 23 00:01:35 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ifname.c,v 1.6 1999/11/30 15:55:25 kleink Exp $ */
+/* $NetBSD: ifname.c,v 1.7 2000/01/23 00:01:35 mycroft Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -106,7 +106,8 @@
if_nameindex()
{
size_t needed;
- int mib[6], i, ifn = 0, off = 0, hlen;
+ int mib[6], i, ifn = 0, off = 0;
+ size_t hlen;
char *buf = NULL, *lim, *next, *cp, *ifbuf = NULL;
struct rt_msghdr *rtm;
struct if_msghdr *ifm;
@@ -165,7 +166,7 @@
sdl = (struct sockaddr_dl *)sa;
memcpy(ifbuf + off,
sdl->sdl_data,
- sdl->sdl_nlen);
+ (size_t)sdl->sdl_nlen);
off += sdl->sdl_nlen;
*(ifbuf + off) = '\0';
off++;
@@ -195,7 +196,7 @@
errno = ENOMEM;
goto end;
}
- (void)memcpy(cp + hlen, ifbuf, off);
+ memcpy(cp + hlen, ifbuf, (size_t)off);
ret = (struct if_nameindex *)cp;
for (i = 0; i < ifn; i++) {
ret[i].if_index = ifx[i].if_index;
Home |
Main Index |
Thread Index |
Old Index