From: Ben Pfaff Date: Wed, 4 May 2011 20:58:10 +0000 (-0700) Subject: Add missing "static" keywords. X-Git-Tag: v1.2.0~350 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=d3d8f1f7e51c1808471e081c46ec631af7375272;p=sliver-openvswitch.git Add missing "static" keywords. Found by sparse. --- diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index 0aad8671e..24a81bd86 100644 --- a/lib/dpif-linux.c +++ b/lib/dpif-linux.c @@ -1473,7 +1473,7 @@ dpif_linux_dp_to_ofpbuf(const struct dpif_linux_dp *dp, struct ofpbuf *buf) } /* Clears 'dp' to "empty" values. */ -void +static void dpif_linux_dp_init(struct dpif_linux_dp *dp) { memset(dp, 0, sizeof *dp); @@ -1500,7 +1500,7 @@ dpif_linux_dp_dump_start(struct nl_dump *dump) * result of the command is expected to be of the same form, which is decoded * and stored in '*reply' and '*bufp'. The caller must free '*bufp' when the * reply is no longer needed ('reply' will contain pointers into '*bufp'). */ -int +static int dpif_linux_dp_transact(const struct dpif_linux_dp *request, struct dpif_linux_dp *reply, struct ofpbuf **bufp) { @@ -1530,7 +1530,7 @@ dpif_linux_dp_transact(const struct dpif_linux_dp *request, /* Obtains information about 'dpif_' and stores it into '*reply' and '*bufp'. * The caller must free '*bufp' when the reply is no longer needed ('reply' * will contain pointers into '*bufp'). */ -int +static int dpif_linux_dp_get(const struct dpif *dpif_, struct dpif_linux_dp *reply, struct ofpbuf **bufp) { @@ -1640,7 +1640,7 @@ dpif_linux_flow_to_ofpbuf(const struct dpif_linux_flow *flow, } /* Clears 'flow' to "empty" values. */ -void +static void dpif_linux_flow_init(struct dpif_linux_flow *flow) { memset(flow, 0, sizeof *flow); @@ -1652,7 +1652,7 @@ dpif_linux_flow_init(struct dpif_linux_flow *flow) * result of the command is expected to be a flow also, which is decoded and * stored in '*reply' and '*bufp'. The caller must free '*bufp' when the reply * is no longer needed ('reply' will contain pointers into '*bufp'). */ -int +static int dpif_linux_flow_transact(const struct dpif_linux_flow *request, struct dpif_linux_flow *reply, struct ofpbuf **bufp) { diff --git a/ovsdb/execution.c b/ovsdb/execution.c index 708cc60dd..176858240 100644 --- a/ovsdb/execution.c +++ b/ovsdb/execution.c @@ -200,7 +200,7 @@ exit: return results; } -struct ovsdb_error * +static struct ovsdb_error * ovsdb_execute_commit(struct ovsdb_execution *x, struct ovsdb_parser *parser, struct json *result OVS_UNUSED) { @@ -270,7 +270,7 @@ parse_row(const struct json *json, const struct ovsdb_table *table, } } -struct ovsdb_error * +static struct ovsdb_error * ovsdb_execute_insert(struct ovsdb_execution *x, struct ovsdb_parser *parser, struct json *result) { @@ -341,7 +341,7 @@ ovsdb_execute_insert(struct ovsdb_execution *x, struct ovsdb_parser *parser, return error; } -struct ovsdb_error * +static struct ovsdb_error * ovsdb_execute_select(struct ovsdb_execution *x, struct ovsdb_parser *parser, struct json *result) { @@ -408,7 +408,7 @@ update_row_cb(const struct ovsdb_row *row, void *ur_) return true; } -struct ovsdb_error * +static struct ovsdb_error * ovsdb_execute_update(struct ovsdb_execution *x, struct ovsdb_parser *parser, struct json *result) { @@ -465,7 +465,7 @@ mutate_row_cb(const struct ovsdb_row *row, void *mr_) return true; } -struct ovsdb_error * +static struct ovsdb_error * ovsdb_execute_mutate(struct ovsdb_execution *x, struct ovsdb_parser *parser, struct json *result) { @@ -522,7 +522,7 @@ delete_row_cb(const struct ovsdb_row *row, void *dr_) return true; } -struct ovsdb_error * +static struct ovsdb_error * ovsdb_execute_delete(struct ovsdb_execution *x, struct ovsdb_parser *parser, struct json *result) { diff --git a/ovsdb/jsonrpc-server.c b/ovsdb/jsonrpc-server.c index fc9c60478..379fc524d 100644 --- a/ovsdb/jsonrpc-server.c +++ b/ovsdb/jsonrpc-server.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2010 Nicira Networks +/* Copyright (c) 2009, 2010, 2011 Nicira Networks * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,7 +42,7 @@ struct ovsdb_jsonrpc_remote; struct ovsdb_jsonrpc_session; /* Message rate-limiting. */ -struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); +static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); /* Sessions. */ static struct ovsdb_jsonrpc_session *ovsdb_jsonrpc_session_create( diff --git a/utilities/ovs-dpctl.c b/utilities/ovs-dpctl.c index 40048b445..2d0ec1267 100644 --- a/utilities/ovs-dpctl.c +++ b/utilities/ovs-dpctl.c @@ -46,7 +46,7 @@ VLOG_DEFINE_THIS_MODULE(dpctl); /* -s, --statistics: Print port statistics? */ -bool print_statistics; +static bool print_statistics; static const struct command all_commands[];