summaryrefslogtreecommitdiffstats
path: root/ax25
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2017-01-30 11:24:24 +0100
committerRalf Baechle <ralf@linux-mips.org>2017-02-06 23:43:46 +0100
commit2d725b728cd82c0b203fe996c08d23ea6dafe9d1 (patch)
treeca59093f5bbf218392de73ebfa0bb081793cca40 /ax25
parent71918b7d4e95f6ccf7b4d90eb7538c3406c5fb05 (diff)
axspawn: Make several functions and variables static.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'ax25')
-rw-r--r--ax25/access.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/ax25/access.c b/ax25/access.c
index c772ae1..7f3d0c3 100644
--- a/ax25/access.c
+++ b/ax25/access.c
@@ -18,18 +18,13 @@
#define SYSTEMPW 0
#define USERPW 1
-long seed = 1L;
+static long seed = 1L;
-int conv_rand(void);
-void conv_randomize(void);
-int conv_random(int num, int base);
-char *generate_rand_pw(int len);
void calc_md5_pw (const char *MD5prompt, const char *MD5pw, char *MD5result);
-static void char_to_hex(char *c, char *h, int n);
/*--------------------------------------------------------------------------*/
-int conv_rand(void)
+static int conv_rand(void)
{
seed = (1103515245L * seed + 12345) & CONV_RAND_MAX;
return (int) (seed & 077777);
@@ -37,14 +32,14 @@ int conv_rand(void)
/*--------------------------------------------------------------------------*/
-void conv_randomize(void)
+static void conv_randomize(void)
{
seed = (time(0) & CONV_RAND_MAX);
}
/*--------------------------------------------------------------------------*/
-int conv_random(int num, int base)
+static int conv_random(int num, int base)
{
return ((long) (conv_rand() * time(0)) & CONV_RAND_MAX) % num + base;
}
@@ -66,7 +61,7 @@ static void char_to_hex(char *c, char *h, int n)
/*--------------------------------------------------------------------------*/
-char *generate_rand_pw(int len)
+static char *generate_rand_pw(int len)
{
static char pass[PASSSIZE+1];
int i, j;
@@ -204,7 +199,9 @@ void calc_md5_pw (const char *MD5prompt, const char *MD5pw, char *MD5result)
/*--------------------------------------------------------------------------*/
-void write_example_passwd(char *pwfile, char pwlocation, struct passwd *pw) {
+static void write_example_passwd(char *pwfile, char pwlocation,
+ struct passwd *pw)
+{
FILE * f;
int i;