diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-09-24 13:29:30 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-09-24 13:29:30 +0000 |
commit | 0df142c814e864e0da4dbc09c556d9632501d2ee (patch) | |
tree | a926dd6008bd484078dbefcd76a0c1d4ec656424 | |
parent | 2fb4d27f7c8f66a5533c0b77032879d78167fb8c (diff) |
Implement if_freenameindex() as a real function as required by posix.
OK deraadt@, millert@
-rw-r--r-- | lib/libc/net/if_nameindex.c | 8 | ||||
-rw-r--r-- | sys/net/if.h | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/lib/libc/net/if_nameindex.c b/lib/libc/net/if_nameindex.c index 3675a2a4507..c5a771869bc 100644 --- a/lib/libc/net/if_nameindex.c +++ b/lib/libc/net/if_nameindex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nameindex.c,v 1.9 2002/03/07 22:40:23 millert Exp $ */ +/* $OpenBSD: if_nameindex.c,v 1.10 2010/09/24 13:29:29 claudio Exp $ */ /* $KAME: if_nameindex.c,v 1.7 2000/11/24 08:17:20 itojun Exp $ */ /*- @@ -138,3 +138,9 @@ out: freeifaddrs(ifaddrs); return(ifni); } + +void +if_freenameindex(struct if_nameindex *ptr) +{ + free(ptr); +} diff --git a/sys/net/if.h b/sys/net/if.h index 8409aa44c51..a04f86dbc31 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if.h,v 1.119 2010/09/23 10:49:55 dlg Exp $ */ +/* $OpenBSD: if.h,v 1.120 2010/09/24 13:29:29 claudio Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -663,8 +663,8 @@ __BEGIN_DECLS unsigned int if_nametoindex(const char *); char *if_indextoname(unsigned int, char *); struct if_nameindex *if_nameindex(void); +void if_freenameindex(struct if_nameindex *); __END_DECLS -#define if_freenameindex(x) free(x) #endif #include <net/if_arp.h> |