Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/dist/ipsec-tools/src/libipsec fix -Wunused and -Wold-...
details: https://anonhg.NetBSD.org/src/rev/218efe8b1338
branches: trunk
changeset: 362128:218efe8b1338
user: maxv <maxv%NetBSD.org@localhost>
date: Mon May 28 19:22:40 2018 +0000
description:
fix -Wunused and -Wold-style-definition
diffstat:
crypto/dist/ipsec-tools/src/libipsec/ipsec_dump_policy.c | 37 +-----
crypto/dist/ipsec-tools/src/libipsec/ipsec_get_policylen.c | 5 +-
crypto/dist/ipsec-tools/src/libipsec/key_debug.c | 70 ++++---------
crypto/dist/ipsec-tools/src/libipsec/pfkey.c | 33 +----
crypto/dist/ipsec-tools/src/libipsec/pfkey_dump.c | 41 ++-----
crypto/dist/ipsec-tools/src/libipsec/policy_parse.y | 29 ++---
crypto/dist/ipsec-tools/src/libipsec/policy_token.l | 7 +-
7 files changed, 69 insertions(+), 153 deletions(-)
diffs (truncated from 686 to 300 lines):
diff -r a1c4f9f21235 -r 218efe8b1338 crypto/dist/ipsec-tools/src/libipsec/ipsec_dump_policy.c
--- a/crypto/dist/ipsec-tools/src/libipsec/ipsec_dump_policy.c Mon May 28 15:48:23 2018 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/ipsec_dump_policy.c Mon May 28 19:22:40 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec_dump_policy.c,v 1.9 2010/12/03 15:01:11 tteras Exp $ */
+/* $NetBSD: ipsec_dump_policy.c,v 1.10 2018/05/28 19:22:40 maxv Exp $ */
/* Id: ipsec_dump_policy.c,v 1.10 2005/06/29 09:12:37 manubsd Exp */
@@ -76,26 +76,19 @@
* When delimiter == NULL, alternatively ' '(space) is applied.
*/
char *
-ipsec_dump_policy(policy, delimiter)
- ipsec_policy_t policy;
- __ipsec_const char *delimiter;
+ipsec_dump_policy(ipsec_policy_t policy, __ipsec_const char *delimiter)
{
return ipsec_dump_policy1(policy, delimiter, 0);
}
char *
-ipsec_dump_policy_withports(policy, delimiter)
- void *policy;
- const char *delimiter;
+ipsec_dump_policy_withports(void *policy, const char *delimiter)
{
return ipsec_dump_policy1(policy, delimiter, 1);
}
static char *
-ipsec_dump_policy1(policy, delimiter, withports)
- void *policy;
- const char *delimiter;
- int withports;
+ipsec_dump_policy1(void *policy, const char *delimiter, int withports)
{
struct sadb_x_policy *xpl = policy;
struct sadb_x_ipsecrequest *xisr;
@@ -276,12 +269,8 @@
}
static char *
-ipsec_dump_ipsecrequest(buf, len, xisr, bound, withports)
- char *buf;
- size_t len;
- struct sadb_x_ipsecrequest *xisr;
- size_t bound; /* boundary */
- int withports;
+ipsec_dump_ipsecrequest(char *buf, size_t len, struct sadb_x_ipsecrequest *xisr,
+ size_t bound /* boundary */, int withports)
{
const char *proto, *mode, *level;
char abuf[NI_MAXHOST * 2 + 2];
@@ -376,12 +365,8 @@
}
static int
-set_addresses(buf, len, sa1, sa2, withports)
- char *buf;
- size_t len;
- struct sockaddr *sa1;
- struct sockaddr *sa2;
- int withports;
+set_addresses(char *buf, size_t len, struct sockaddr *sa1, struct sockaddr *sa2,
+ int withports)
{
char tmp1[NI_MAXHOST], tmp2[NI_MAXHOST];
@@ -395,11 +380,7 @@
}
static char *
-set_address(buf, len, sa, withports)
- char *buf;
- size_t len;
- struct sockaddr *sa;
- int withports;
+set_address(char *buf, size_t len, struct sockaddr *sa, int withports)
{
const int niflags = NI_NUMERICHOST | NI_NUMERICSERV;
char host[NI_MAXHOST];
diff -r a1c4f9f21235 -r 218efe8b1338 crypto/dist/ipsec-tools/src/libipsec/ipsec_get_policylen.c
--- a/crypto/dist/ipsec-tools/src/libipsec/ipsec_get_policylen.c Mon May 28 15:48:23 2018 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/ipsec_get_policylen.c Mon May 28 19:22:40 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec_get_policylen.c,v 1.7 2007/07/18 12:07:50 vanhu Exp $ */
+/* $NetBSD: ipsec_get_policylen.c,v 1.8 2018/05/28 19:22:40 maxv Exp $ */
/* $KAME: ipsec_get_policylen.c,v 1.5 2000/05/07 05:25:03 itojun Exp $ */
@@ -47,8 +47,7 @@
#include "ipsec_strerror.h"
int
-ipsec_get_policylen(policy)
- ipsec_policy_t policy;
+ipsec_get_policylen(ipsec_policy_t policy)
{
return policy ? PFKEY_EXTLEN(policy) : -1;
}
diff -r a1c4f9f21235 -r 218efe8b1338 crypto/dist/ipsec-tools/src/libipsec/key_debug.c
--- a/crypto/dist/ipsec-tools/src/libipsec/key_debug.c Mon May 28 15:48:23 2018 +0000
+++ b/crypto/dist/ipsec-tools/src/libipsec/key_debug.c Mon May 28 19:22:40 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: key_debug.c,v 1.11 2017/04/26 03:16:06 ozaki-r Exp $ */
+/* $NetBSD: key_debug.c,v 1.12 2018/05/28 19:22:40 maxv Exp $ */
/* $KAME: key_debug.c,v 1.29 2001/08/16 14:25:41 itojun Exp $ */
@@ -111,8 +111,7 @@
/* %%%: about struct sadb_msg */
void
-kdebug_sadb(base)
- struct sadb_msg *base;
+kdebug_sadb(struct sadb_msg *base)
{
struct sadb_ext *ext;
int tlen, extlen;
@@ -226,8 +225,7 @@
}
static void
-kdebug_sadb_prop(ext)
- struct sadb_ext *ext;
+kdebug_sadb_prop(struct sadb_ext *ext)
{
struct sadb_prop *prop = (void *)ext;
struct sadb_comb *comb;
@@ -276,8 +274,7 @@
}
static void
-kdebug_sadb_identity(ext)
- struct sadb_ext *ext;
+kdebug_sadb_identity(struct sadb_ext *ext)
{
struct sadb_ident *id = (void *)ext;
int len;
@@ -319,8 +316,7 @@
}
static void
-kdebug_sadb_supported(ext)
- struct sadb_ext *ext;
+kdebug_sadb_supported(struct sadb_ext *ext)
{
struct sadb_supported *sup = (void *)ext;
struct sadb_alg *alg;
@@ -346,8 +342,7 @@
}
static void
-kdebug_sadb_lifetime(ext)
- struct sadb_ext *ext;
+kdebug_sadb_lifetime(struct sadb_ext *ext)
{
struct sadb_lifetime *lft = (void *)ext;
@@ -366,8 +361,7 @@
}
static void
-kdebug_sadb_sa(ext)
- struct sadb_ext *ext;
+kdebug_sadb_sa(struct sadb_ext *ext)
{
struct sadb_sa *sa = (void *)ext;
@@ -385,8 +379,7 @@
}
static void
-kdebug_sadb_address(ext)
- struct sadb_ext *ext;
+kdebug_sadb_address(struct sadb_ext *ext)
{
struct sadb_address *addr = (void *)ext;
@@ -405,8 +398,7 @@
}
static void
-kdebug_sadb_key(ext)
- struct sadb_ext *ext;
+kdebug_sadb_key(struct sadb_ext *ext)
{
struct sadb_key *key = (void *)ext;
@@ -433,8 +425,7 @@
}
static void
-kdebug_sadb_x_sa2(ext)
- struct sadb_ext *ext;
+kdebug_sadb_x_sa2(struct sadb_ext *ext)
{
struct sadb_x_sa2 *sa2 = (void *)ext;
@@ -452,8 +443,7 @@
}
void
-kdebug_sadb_x_policy(ext)
- struct sadb_ext *ext;
+kdebug_sadb_x_policy(struct sadb_ext *ext)
{
struct sadb_x_policy *xpl = (void *)ext;
struct sockaddr *addr;
@@ -569,8 +559,7 @@
#ifdef SADB_X_EXT_PACKET
static void
-kdebug_sadb_x_packet(ext)
- struct sadb_ext *ext;
+kdebug_sadb_x_packet(struct sadb_ext *ext)
{
struct sadb_x_packet *pkt = (struct sadb_x_packet *)ext;
@@ -589,8 +578,7 @@
#ifdef SADB_X_EXT_KMADDRESS
static void
-kdebug_sadb_x_kmaddress(ext)
- struct sadb_ext *ext;
+kdebug_sadb_x_kmaddress(struct sadb_ext *ext)
{
struct sadb_x_kmaddress *kma = (struct sadb_x_kmaddress *)ext;
struct sockaddr * sa;
@@ -633,8 +621,7 @@
#ifdef _KERNEL
/* %%%: about SPD and SAD */
void
-kdebug_secpolicy(sp)
- struct secpolicy *sp;
+kdebug_secpolicy(struct secpolicy *sp)
{
/* sanity check */
if (sp == NULL)
@@ -682,8 +669,7 @@
}
void
-kdebug_secpolicyindex(spidx)
- struct secpolicyindex *spidx;
+kdebug_secpolicyindex(struct secpolicyindex *spidx)
{
/* sanity check */
if (spidx == NULL)
@@ -703,8 +689,7 @@
}
void
-kdebug_secasindex(saidx)
- struct secasindex *saidx;
+kdebug_secasindex(struct secasindex *saidx)
{
/* sanity check */
if (saidx == NULL)
@@ -724,8 +709,7 @@
}
void
-kdebug_secasv(sav)
- struct secasvar *sav;
+kdebug_secasv(struct secasvar *sav)
{
/* sanity check */
if (sav == NULL)
@@ -766,8 +750,7 @@
}
static void
-kdebug_secreplay(rpl)
- struct secreplay *rpl;
+kdebug_secreplay(struct secreplay *rpl)
{
int len, l;
@@ -795,8 +778,7 @@
}
void
-kdebug_mbufhdr(m)
- struct mbuf *m;
+kdebug_mbufhdr(struct mbuf *m)
{
/* sanity check */
if (m == NULL)
@@ -825,8 +807,7 @@
}
void
-kdebug_mbuf(m0)
- struct mbuf *m0;
+kdebug_mbuf(struct mbuf *m0)
{
struct mbuf *m = m0;
int i, j;
Home |
Main Index |
Thread Index |
Old Index