Add missing "static" keywords.
authorBen Pfaff <blp@nicira.com>
Wed, 4 May 2011 20:58:10 +0000 (13:58 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 16 May 2011 20:40:47 +0000 (13:40 -0700)
Found by sparse.

lib/dpif-linux.c
ovsdb/execution.c
ovsdb/jsonrpc-server.c
utilities/ovs-dpctl.c

index 0aad867..24a81bd 100644 (file)
@@ -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)
 {
index 708cc60..1768582 100644 (file)
@@ -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)
 {
index fc9c604..379fc52 100644 (file)
@@ -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(
index 40048b4..2d0ec12 100644 (file)
@@ -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[];