summaryrefslogtreecommitdiffstats
path: root/ax25mond
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2017-01-31 11:32:49 +0100
committerRalf Baechle <ralf@linux-mips.org>2017-01-31 11:32:49 +0100
commit1de0ea4abd7153c6fcdbdbac6048a1e46f673fc2 (patch)
treec81a8d6c58fcee19cead9cce8122ec35342428b1 /ax25mond
parentaa1bfde879f3c5885199d7bb4720efaabff67d8c (diff)
Sort out variable and function declarations.
- Make static what can be made static. - Add declaration where they were missing. - Don't define variables in headers. - Move declaations to the proper locations. - Pick up declarations from the proper headers. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'ax25mond')
-rw-r--r--ax25mond/ax25mond.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/ax25mond/ax25mond.c b/ax25mond/ax25mond.c
index 6388af9..5530bf5 100644
--- a/ax25mond/ax25mond.c
+++ b/ax25mond/ax25mond.c
@@ -63,22 +63,22 @@ static union {
/*--------------------------------------------------------------------------*/
-int sock_list[MAX_SOCKETS];
-char sock_monmode[MAX_SOCKETS];
-char sock_filename[MAX_SOCKETS][100];
-int sock_num = 0;
-int conn_list[MAX_CONNECTS];
-struct sockaddr conn_addr[MAX_CONNECTS];
-socklen_t conn_addrlen[MAX_CONNECTS];
-char conn_monmode[MAX_CONNECTS];
-int conn_num = 0;
-int highest_sock_fd;
-int end = 0;
+static int sock_list[MAX_SOCKETS];
+static char sock_monmode[MAX_SOCKETS];
+static char sock_filename[MAX_SOCKETS][100];
+static int sock_num = 0;
+static int conn_list[MAX_CONNECTS];
+static struct sockaddr conn_addr[MAX_CONNECTS];
+static socklen_t conn_addrlen[MAX_CONNECTS];
+static char conn_monmode[MAX_CONNECTS];
+static int conn_num = 0;
+static int highest_sock_fd;
+static int end = 0;
/*--------------------------------------------------------------------------*/
/* from buildsaddr.c */
-struct sockaddr *build_sockaddr(const char *name, int *addrlen)
+static struct sockaddr *build_sockaddr(const char *name, int *addrlen)
{
char *host_name;
char *serv_name;
@@ -134,7 +134,7 @@ struct sockaddr *build_sockaddr(const char *name, int *addrlen)
/*--------------------------------------------------------------------------*/
-void add_socket(char *sockname, char monmode)
+static void add_socket(char *sockname, char monmode)
{
struct sockaddr *saddr;
int saddrlen;
@@ -190,7 +190,7 @@ void add_socket(char *sockname, char monmode)
/*--------------------------------------------------------------------------*/
-void close_sockets(void)
+static void close_sockets(void)
{
int i;
@@ -204,7 +204,7 @@ void close_sockets(void)
/*--------------------------------------------------------------------------*/
-void quit_handler(int dummy)
+static void quit_handler(int dummy)
{
end = 1;
}