git » nmdb » commit 83b6f4a

Mark functions as static in the network abstractions

author Alberto Bertogli
2008-06-01 04:33:07 UTC
committer Alberto Bertogli
2008-06-01 04:34:42 UTC
parent a43aaaebd9b67b95d811f2189aac936ef298ed5c

Mark functions as static in the network abstractions

There is no need to export these functions, because they're not used
by name outside their respective files. Use via function pointers is not
affected by this.

Caught by sparse.

Signed-off-by: Alberto Bertogli <albertito@gmail.com>

nmdb/sctp.c +2 -2
nmdb/tcp.c +3 -3
nmdb/tipc.c +2 -2
nmdb/udp.c +2 -2

diff --git a/nmdb/sctp.c b/nmdb/sctp.c
index bd74037..f912f7e 100644
--- a/nmdb/sctp.c
+++ b/nmdb/sctp.c
@@ -89,12 +89,12 @@ static void sctp_reply_mini(struct req_info *req, uint32_t reply)
 /* The sctp_reply_* functions are used by the db code to send the network
  * replies. */
 
-void sctp_reply_err(struct req_info *req, uint32_t reply)
+static void sctp_reply_err(struct req_info *req, uint32_t reply)
 {
 	rep_send_error(req, reply);
 }
 
-void sctp_reply_long(struct req_info *req, uint32_t reply,
+static void sctp_reply_long(struct req_info *req, uint32_t reply,
 			unsigned char *val, size_t vsize)
 {
 	if (val == NULL) {
diff --git a/nmdb/tcp.c b/nmdb/tcp.c
index c1ed546..5b1c1ed 100644
--- a/nmdb/tcp.c
+++ b/nmdb/tcp.c
@@ -144,7 +144,7 @@ static int rep_send(const struct req_info *req, const unsigned char *buf,
 
 
 /* Send small replies, consisting in only a value. */
-void tcp_reply_mini(struct req_info *req, uint32_t reply)
+static void tcp_reply_mini(struct req_info *req, uint32_t reply)
 {
 	/* We use a mini buffer to speedup the small replies, to avoid the
 	 * malloc() overhead. */
@@ -164,12 +164,12 @@ void tcp_reply_mini(struct req_info *req, uint32_t reply)
 }
 
 
-void tcp_reply_err(struct req_info *req, uint32_t reply)
+static void tcp_reply_err(struct req_info *req, uint32_t reply)
 {
 	rep_send_error(req, reply);
 }
 
-void tcp_reply_long(struct req_info *req, uint32_t reply,
+static void tcp_reply_long(struct req_info *req, uint32_t reply,
 			unsigned char *val, size_t vsize)
 {
 	if (val == NULL) {
diff --git a/nmdb/tipc.c b/nmdb/tipc.c
index 9d35a7f..975b925 100644
--- a/nmdb/tipc.c
+++ b/nmdb/tipc.c
@@ -88,12 +88,12 @@ static void tipc_reply_mini(struct req_info *req, uint32_t reply)
 /* The tipc_reply_* functions are used by the db code to send the network
  * replies. */
 
-void tipc_reply_err(struct req_info *req, uint32_t reply)
+static void tipc_reply_err(struct req_info *req, uint32_t reply)
 {
 	rep_send_error(req, reply);
 }
 
-void tipc_reply_long(struct req_info *req, uint32_t reply,
+static void tipc_reply_long(struct req_info *req, uint32_t reply,
 			unsigned char *val, size_t vsize)
 {
 	if (val == NULL) {
diff --git a/nmdb/udp.c b/nmdb/udp.c
index edf85b4..1c65673 100644
--- a/nmdb/udp.c
+++ b/nmdb/udp.c
@@ -89,12 +89,12 @@ static void udp_reply_mini(struct req_info *req, uint32_t reply)
 /* The udp_reply_* functions are used by the db code to send the network
  * replies. */
 
-void udp_reply_err(struct req_info *req, uint32_t reply)
+static void udp_reply_err(struct req_info *req, uint32_t reply)
 {
 	rep_send_error(req, reply);
 }
 
-void udp_reply_long(struct req_info *req, uint32_t reply,
+static void udp_reply_long(struct req_info *req, uint32_t reply,
 			unsigned char *val, size_t vsize)
 {
 	if (val == NULL) {