public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@open-mesh.com>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Sven Eckelmann <sven@open-mesh.com>
Subject: [B.A.T.M.A.N.] [PATCH 2/7] alfred: Mark all local functions as static
Date: Mon,  9 Sep 2013 17:46:02 +0200	[thread overview]
Message-ID: <1378741567-25152-2-git-send-email-sven@open-mesh.com> (raw)
In-Reply-To: <1378741567-25152-1-git-send-email-sven@open-mesh.com>

Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
---
 vis/vis.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/vis/vis.c b/vis/vis.c
index 5247b31..5e7a109 100644
--- a/vis/vis.c
+++ b/vis/vis.c
@@ -36,7 +36,7 @@
 #include <unistd.h>
 #include "debugfs.h"
 
-char *read_file(char *fname)
+static char *read_file(char *fname)
 {
 	FILE *fp;
 	char *buf = NULL;
@@ -64,7 +64,7 @@ char *read_file(char *fname)
 	return buf;
 }
 
-char *mac_to_str(uint8_t *mac)
+static char *mac_to_str(uint8_t *mac)
 {
 	static char macstr[20];
 	snprintf(macstr, sizeof(macstr), "%02x:%02x:%02x:%02x:%02x:%02x",
@@ -72,7 +72,7 @@ char *mac_to_str(uint8_t *mac)
 	return macstr;
 }
 
-uint8_t *str_to_mac(char *str)
+static uint8_t *str_to_mac(char *str)
 {
 	static uint8_t mac[ETH_ALEN];
 	int ret;
@@ -91,7 +91,7 @@ uint8_t *str_to_mac(char *str)
 	return mac;
 }
 
-int get_if_mac(char *ifname, uint8_t *mac)
+static int get_if_mac(char *ifname, uint8_t *mac)
 {
 	struct ifreq ifr;
 	int sock;
@@ -112,7 +112,7 @@ int get_if_mac(char *ifname, uint8_t *mac)
 	return 0;
 }
 
-int get_if_index(struct globals *globals, char *ifname)
+static int get_if_index(struct globals *globals, char *ifname)
 {
 	struct iface_list_entry *i_entry;
 	int i;
@@ -143,7 +143,7 @@ int get_if_index(struct globals *globals, char *ifname)
 	return i;
 }
 
-int alfred_open_sock(struct globals *globals)
+static int alfred_open_sock(struct globals *globals)
 {
 	struct sockaddr_un addr;
 
@@ -168,7 +168,7 @@ int alfred_open_sock(struct globals *globals)
 	return 0;
 }
 
-int parse_transtable_local(struct globals *globals)
+static int parse_transtable_local(struct globals *globals)
 {
 	char *fbuf;
 	char *lptr, *tptr;
@@ -218,7 +218,7 @@ int parse_transtable_local(struct globals *globals)
 	return 0;
 }
 
-void clear_lists(struct globals *globals)
+static void clear_lists(struct globals *globals)
 {
 	struct vis_list_entry *v_entry, *v_entry_safe;
 	struct iface_list_entry *i_entry, *i_entry_safe;
@@ -300,7 +300,7 @@ err:
 }
 
 
-int parse_orig_list(struct globals *globals)
+static int parse_orig_list(struct globals *globals)
 {
 	char *fbuf;
 	char *lptr, *tptr;
@@ -368,7 +368,7 @@ int parse_orig_list(struct globals *globals)
 	return 0;
 }
 
-int vis_publish_data(struct globals *globals)
+static int vis_publish_data(struct globals *globals)
 {
 	int len, ret;
 
@@ -396,7 +396,7 @@ int vis_publish_data(struct globals *globals)
 	return 0;
 }
 
-int compile_vis_data(struct globals *globals)
+static int compile_vis_data(struct globals *globals)
 {
 	struct iface_list_entry *i_entry;
 	struct vis_list_entry *v_entry;
@@ -424,7 +424,7 @@ int compile_vis_data(struct globals *globals)
 	return 0;
 }
 
-int vis_update_data(struct globals *globals)
+static int vis_update_data(struct globals *globals)
 {
 	clear_lists(globals);
 	register_interfaces(globals);
@@ -437,7 +437,7 @@ int vis_update_data(struct globals *globals)
 	return 0;
 }
 
-int vis_request_data(struct globals *globals)
+static int vis_request_data(struct globals *globals)
 {
 	int ret;
 
@@ -463,7 +463,7 @@ int vis_request_data(struct globals *globals)
 }
 
 
-struct vis_v1 *vis_receive_answer_packet(int sock, uint16_t *len)
+static struct vis_v1 *vis_receive_answer_packet(int sock, uint16_t *len)
 {
 	static uint8_t buf[65536];
 	struct alfred_tlv *tlv;
@@ -510,7 +510,7 @@ struct vis_v1 *vis_receive_answer_packet(int sock, uint16_t *len)
 	return (struct vis_v1 *) data->data;
 }
 
-int vis_read_answer(struct globals *globals)
+static int vis_read_answer(struct globals *globals)
 {
 	struct vis_v1 *vis_data;
 	uint16_t len;
@@ -593,7 +593,7 @@ int vis_read_answer(struct globals *globals)
 	return 0;
 }
 
-int vis_get_data(struct globals *globals)
+static int vis_get_data(struct globals *globals)
 {
 	globals->unix_sock = vis_request_data(globals);
 	if (globals->unix_sock < 0)
@@ -676,7 +676,7 @@ static struct globals *vis_init(int argc, char *argv[])
 
 
 
-int vis_server(struct globals *globals)
+static int vis_server(struct globals *globals)
 {
 	char *debugfs_mnt;
 
-- 
1.8.4.rc3


  reply	other threads:[~2013-09-09 15:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-09 15:46 [B.A.T.M.A.N.] [PATCH 1/7] alfred: Add missing includes and remove unused includes Sven Eckelmann
2013-09-09 15:46 ` Sven Eckelmann [this message]
2013-09-09 17:21   ` [B.A.T.M.A.N.] [PATCH 2/7] alfred: Mark all local functions as static Simon Wunderlich
2013-09-09 15:46 ` [B.A.T.M.A.N.] [PATCH 3/7] alfred: Fix warning about assigning const to non-const Sven Eckelmann
2013-09-09 17:21   ` Simon Wunderlich
2013-09-09 15:46 ` [B.A.T.M.A.N.] [PATCH 4/7] alfred: Stop client when data header could not be read Sven Eckelmann
2013-09-09 17:22   ` Simon Wunderlich
2013-09-09 15:46 ` [B.A.T.M.A.N.] [PATCH 5/7] alfred: Remove dead assignment in unix_sock_read Sven Eckelmann
2013-09-09 17:22   ` Simon Wunderlich
2013-09-09 15:46 ` [B.A.T.M.A.N.] [PATCH 6/7] alfred: Fix crash when vis opened empty file Sven Eckelmann
2013-09-09 17:22   ` Simon Wunderlich
2013-09-09 15:46 ` [B.A.T.M.A.N.] [PATCH 7/7] alfred: Allow to switch daemon between slave and master Sven Eckelmann
2013-09-09 17:23   ` Simon Wunderlich
2013-09-09 17:20 ` [B.A.T.M.A.N.] [PATCH 1/7] alfred: Add missing includes and remove unused includes Simon Wunderlich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1378741567-25152-2-git-send-email-sven@open-mesh.com \
    --to=sven@open-mesh.com \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox