Repository : ssh://git@open-mesh.org/alfred
On branch : master
commit 4283f50276f734de14ac0b19cf61aa1771f54b72 Author: Sven Eckelmann sven@open-mesh.com Date: Tue Jan 8 16:33:45 2013 +0100
alfred: Mark local functions as static
Signed-off-by: Sven Eckelmann sven@open-mesh.com
4283f50276f734de14ac0b19cf61aa1771f54b72 debugfs.c | 7 +++++-- debugfs.h | 2 -- main.c | 4 ++-- recv.c | 17 +++++++++-------- unix_sock.c | 7 ++++--- 5 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/debugfs.c b/debugfs.c index dc2218e..5a0431f 100644 --- a/debugfs.c +++ b/debugfs.c @@ -35,6 +35,9 @@ static int debugfs_premounted; static char debugfs_mountpoint[MAX_PATH+1];
+static const char *debugfs_find_mountpoint(void); +static int debugfs_valid_mountpoint(const char *debugfs); + static const char *debugfs_known_mountpoints[] = { "/sys/kernel/debug/", "/debug/", @@ -63,7 +66,7 @@ int debugfs_make_path(const char *fmt, char *mesh_iface, char *buffer, int size) static int debugfs_found;
/* find the path to the mounted debugfs */ -const char *debugfs_find_mountpoint(void) +static const char *debugfs_find_mountpoint(void) { const char **ptr; char type[100]; @@ -110,7 +113,7 @@ const char *debugfs_find_mountpoint(void)
/* verify that a mountpoint is actually a debugfs instance */
-int debugfs_valid_mountpoint(const char *debugfs) +static int debugfs_valid_mountpoint(const char *debugfs) { struct statfs st_fs;
diff --git a/debugfs.h b/debugfs.h index 3981b8b..4008c37 100644 --- a/debugfs.h +++ b/debugfs.h @@ -33,8 +33,6 @@ # define STR(x) _STR(x) #endif
-extern const char *debugfs_find_mountpoint(void); -extern int debugfs_valid_mountpoint(const char *debugfs); extern int debugfs_valid_entry(const char *path); extern char *debugfs_mount(const char *mountpoint); extern int debugfs_make_path(const char *fmt, char *mesh_iface, diff --git a/main.c b/main.c index 1664129..43a6069 100644 --- a/main.c +++ b/main.c @@ -30,7 +30,7 @@ #include <sys/time.h> #include "alfred.h"
-void alfred_usage(void) +static void alfred_usage(void) { printf("Usage: alfred [options]\n"); printf("client mode options:\n"); @@ -53,7 +53,7 @@ void alfred_usage(void) printf("\n"); }
-struct globals *alfred_init(int argc, char *argv[]) +static struct globals *alfred_init(int argc, char *argv[]) { int opt, opt_ind, i; struct globals *globals; diff --git a/recv.c b/recv.c index 76a4992..a740b80 100644 --- a/recv.c +++ b/recv.c @@ -34,8 +34,9 @@ #include "alfred.h" #include "batadv_query.h"
-int process_alfred_push_data(struct globals *globals, struct ethhdr *ethhdr, - struct alfred_packet *packet) +static int process_alfred_push_data(struct globals *globals, + struct ethhdr *ethhdr, + struct alfred_packet *packet) { int len, data_len; struct alfred_data *data; @@ -101,9 +102,9 @@ err: return -1; }
-int process_alfred_announce_master(struct globals *globals, - struct ethhdr *ethhdr, - struct alfred_packet *packet) +static int process_alfred_announce_master(struct globals *globals, + struct ethhdr *ethhdr, + struct alfred_packet *packet) { struct server *server; struct ether_addr *macaddr; @@ -144,9 +145,9 @@ int process_alfred_announce_master(struct globals *globals, }
-int process_alfred_request(struct globals *globals, - struct ethhdr *ethhdr, - struct alfred_packet *packet) +static int process_alfred_request(struct globals *globals, + struct ethhdr *ethhdr, + struct alfred_packet *packet) { uint8_t type; int len; diff --git a/unix_sock.c b/unix_sock.c index cc55a55..bf11869 100644 --- a/unix_sock.c +++ b/unix_sock.c @@ -90,7 +90,8 @@ int unix_sock_open_client(struct globals *globals, char *path) }
-int unix_sock_add_data(struct globals *globals, struct alfred_packet *packet) +static int unix_sock_add_data(struct globals *globals, + struct alfred_packet *packet) { struct alfred_data *data; struct dataset *dataset; @@ -141,8 +142,8 @@ int unix_sock_add_data(struct globals *globals, struct alfred_packet *packet) }
-int unix_sock_req_data(struct globals *globals, struct alfred_packet *packet, - int client_sock) +static int unix_sock_req_data(struct globals *globals, + struct alfred_packet *packet, int client_sock) { struct hash_it_t *hashit = NULL; struct timeval tv, last_check, now;