summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2009-11-13 20:09:55 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2009-11-13 20:09:55 +0000
commit05b6afeb4021eb2e6f9fc778b0fc22ae6786a00d (patch)
tree3c5ddeb4cc99eb2a5258b491843a97c0267166c2
parent4c10f81d590394179fc04542a88a8ec568b448cb (diff)
Don't use [] in function arguments when dealing with arrays
we don't know the size of, otherwise gcc >= 4 will error. ok markus@ deraadt@
-rw-r--r--sbin/ipsecctl/pfkdump.c10
-rw-r--r--usr.sbin/dvmrpctl/parser.c6
-rw-r--r--usr.sbin/dvmrpctl/parser.h6
-rw-r--r--usr.sbin/ospfctl/parser.c6
-rw-r--r--usr.sbin/ospfctl/parser.h6
-rw-r--r--usr.sbin/relayctl/parser.c6
-rw-r--r--usr.sbin/relayctl/parser.h6
-rw-r--r--usr.sbin/ripctl/parser.c6
-rw-r--r--usr.sbin/ripctl/parser.h6
9 files changed, 29 insertions, 29 deletions
diff --git a/sbin/ipsecctl/pfkdump.c b/sbin/ipsecctl/pfkdump.c
index b25cc9a4e7c..76d510313e4 100644
--- a/sbin/ipsecctl/pfkdump.c
+++ b/sbin/ipsecctl/pfkdump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkdump.c,v 1.25 2008/08/19 10:37:12 markus Exp $ */
+/* $OpenBSD: pfkdump.c,v 1.26 2009/11/13 20:09:54 jsg Exp $ */
/*
* Copyright (c) 2003 Markus Friedl. All rights reserved.
@@ -57,8 +57,8 @@ static void print_cred(struct sadb_ext *, struct sadb_msg *);
static void print_udpenc(struct sadb_ext *, struct sadb_msg *);
static void print_tag(struct sadb_ext *, struct sadb_msg *);
-static struct idname *lookup(struct idname [], u_int8_t);
-static char *lookup_name(struct idname [], u_int8_t);
+static struct idname *lookup(struct idname *, u_int8_t);
+static char *lookup_name(struct idname *, u_int8_t);
static void print_ext(struct sadb_ext *, struct sadb_msg *);
void pfkey_print_raw(u_int8_t *, ssize_t);
@@ -224,7 +224,7 @@ struct idname states[] = {
};
static struct idname *
-lookup(struct idname tab[], u_int8_t id)
+lookup(struct idname *tab, u_int8_t id)
{
struct idname *entry;
@@ -235,7 +235,7 @@ lookup(struct idname tab[], u_int8_t id)
}
static char *
-lookup_name(struct idname tab[], u_int8_t id)
+lookup_name(struct idname *tab, u_int8_t id)
{
struct idname *entry;
diff --git a/usr.sbin/dvmrpctl/parser.c b/usr.sbin/dvmrpctl/parser.c
index 1dd0e447773..4082425cad8 100644
--- a/usr.sbin/dvmrpctl/parser.c
+++ b/usr.sbin/dvmrpctl/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.3 2009/11/02 20:32:17 claudio Exp $ */
+/* $OpenBSD: parser.c,v 1.4 2009/11/13 20:09:54 jsg Exp $ */
/*
* Copyright (c) 2004, 2005, 2006 Esben Norby <norby@openbsd.org>
@@ -142,7 +142,7 @@ parse(int argc, char *argv[])
}
const struct token *
-match_token(const char *word, const struct token table[])
+match_token(const char *word, const struct token *table)
{
u_int i, match;
const struct token *t = NULL;
@@ -222,7 +222,7 @@ match_token(const char *word, const struct token table[])
}
void
-show_valid_args(const struct token table[])
+show_valid_args(const struct token *table)
{
int i;
diff --git a/usr.sbin/dvmrpctl/parser.h b/usr.sbin/dvmrpctl/parser.h
index 56946315077..90ac2c75e49 100644
--- a/usr.sbin/dvmrpctl/parser.h
+++ b/usr.sbin/dvmrpctl/parser.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.h,v 1.2 2009/11/02 20:32:17 claudio Exp $ */
+/* $OpenBSD: parser.h,v 1.3 2009/11/13 20:09:54 jsg Exp $ */
/*
* Copyright (c) 2004, 2005, 2006 Esben Norby <norby@openbsd.org>
@@ -51,8 +51,8 @@ struct parse_result {
};
struct parse_result *parse(int, char *[]);
-const struct token *match_token(const char *, const struct token []);
-void show_valid_args(const struct token []);
+const struct token *match_token(const char *, const struct token *);
+void show_valid_args(const struct token *);
int parse_addr(const char *, struct in_addr *);
int parse_prefix(const char *, struct in_addr *,
u_int8_t *);
diff --git a/usr.sbin/ospfctl/parser.c b/usr.sbin/ospfctl/parser.c
index 8cfacec25eb..42717e9e330 100644
--- a/usr.sbin/ospfctl/parser.c
+++ b/usr.sbin/ospfctl/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.16 2009/11/02 20:23:29 claudio Exp $ */
+/* $OpenBSD: parser.c,v 1.17 2009/11/13 20:09:54 jsg Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -172,7 +172,7 @@ parse(int argc, char *argv[])
}
const struct token *
-match_token(const char *word, const struct token table[])
+match_token(const char *word, const struct token *table)
{
u_int i, match;
const struct token *t = NULL;
@@ -252,7 +252,7 @@ match_token(const char *word, const struct token table[])
}
void
-show_valid_args(const struct token table[])
+show_valid_args(const struct token *table)
{
int i;
diff --git a/usr.sbin/ospfctl/parser.h b/usr.sbin/ospfctl/parser.h
index 2815000c26c..d3366431a24 100644
--- a/usr.sbin/ospfctl/parser.h
+++ b/usr.sbin/ospfctl/parser.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.h,v 1.9 2009/11/02 20:23:29 claudio Exp $ */
+/* $OpenBSD: parser.h,v 1.10 2009/11/13 20:09:54 jsg Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -61,8 +61,8 @@ struct parse_result {
};
struct parse_result *parse(int, char *[]);
-const struct token *match_token(const char *, const struct token []);
-void show_valid_args(const struct token []);
+const struct token *match_token(const char *, const struct token *);
+void show_valid_args(const struct token *);
int parse_addr(const char *, struct in_addr *);
int parse_prefix(const char *, struct in_addr *,
u_int8_t *);
diff --git a/usr.sbin/relayctl/parser.c b/usr.sbin/relayctl/parser.c
index 25c51285b68..b723e83143b 100644
--- a/usr.sbin/relayctl/parser.c
+++ b/usr.sbin/relayctl/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.21 2009/08/17 11:36:01 reyk Exp $ */
+/* $OpenBSD: parser.c,v 1.22 2009/11/13 20:09:54 jsg Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -158,7 +158,7 @@ parse(int argc, char *argv[])
}
const struct token *
-match_token(const char *word, const struct token table[])
+match_token(const char *word, const struct token *table)
{
u_int i, match;
const struct token *t = NULL;
@@ -235,7 +235,7 @@ match_token(const char *word, const struct token table[])
}
void
-show_valid_args(const struct token table[])
+show_valid_args(const struct token *table)
{
int i;
diff --git a/usr.sbin/relayctl/parser.h b/usr.sbin/relayctl/parser.h
index 0a30ae4584c..e3b3b944025 100644
--- a/usr.sbin/relayctl/parser.h
+++ b/usr.sbin/relayctl/parser.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.h,v 1.10 2009/08/17 11:36:01 reyk Exp $ */
+/* $OpenBSD: parser.h,v 1.11 2009/11/13 20:09:54 jsg Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -42,5 +42,5 @@ struct parse_result {
};
struct parse_result *parse(int, char *[]);
-const struct token *match_token(const char *, const struct token []);
-void show_valid_args(const struct token []);
+const struct token *match_token(const char *, const struct token *);
+void show_valid_args(const struct token *);
diff --git a/usr.sbin/ripctl/parser.c b/usr.sbin/ripctl/parser.c
index 6d6fa52f536..04bd2becc9e 100644
--- a/usr.sbin/ripctl/parser.c
+++ b/usr.sbin/ripctl/parser.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.c,v 1.3 2009/11/02 20:29:17 claudio Exp $ */
+/* $OpenBSD: parser.c,v 1.4 2009/11/13 20:09:54 jsg Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
@@ -150,7 +150,7 @@ parse(int argc, char *argv[])
}
const struct token *
-match_token(const char *word, const struct token table[])
+match_token(const char *word, const struct token *table)
{
u_int i, match;
const struct token *t = NULL;
@@ -230,7 +230,7 @@ match_token(const char *word, const struct token table[])
}
void
-show_valid_args(const struct token table[])
+show_valid_args(const struct token *table)
{
int i;
diff --git a/usr.sbin/ripctl/parser.h b/usr.sbin/ripctl/parser.h
index fa471da57a6..c26c9ae13f4 100644
--- a/usr.sbin/ripctl/parser.h
+++ b/usr.sbin/ripctl/parser.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: parser.h,v 1.2 2009/11/02 20:29:17 claudio Exp $ */
+/* $OpenBSD: parser.h,v 1.3 2009/11/13 20:09:54 jsg Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
@@ -50,8 +50,8 @@ struct parse_result {
};
struct parse_result *parse(int, char *[]);
-const struct token *match_token(const char *, const struct token []);
-void show_valid_args(const struct token []);
+const struct token *match_token(const char *, const struct token *);
+void show_valid_args(const struct token *);
int parse_addr(const char *, struct in_addr *);
int parse_prefix(const char *, struct in_addr *,
u_int8_t *);