summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2017-01-30 13:50:48 +0100
committerRalf Baechle <ralf@linux-mips.org>2017-02-06 23:43:46 +0100
commit9bb42aac69dd1fc2bfe9b87d66da44932e3ed819 (patch)
tree0bf6d1634e865e0e9366a8c250f415070b7e6256
parent93a8e81e186a23755e96e07609dbce9d50f9f795 (diff)
axspawn: Fix use of 0 instead of NULL as a pointer value.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--ax25/access.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ax25/access.c b/ax25/access.c
index 2ce2c94..951830c 100644
--- a/ax25/access.c
+++ b/ax25/access.c
@@ -32,14 +32,14 @@ static int conv_rand(void)
static void conv_randomize(void)
{
- seed = (time(0) & CONV_RAND_MAX);
+ seed = (time(NULL) & CONV_RAND_MAX);
}
/*--------------------------------------------------------------------------*/
static int conv_random(int num, int base)
{
- return ((long) (conv_rand() * time(0)) & CONV_RAND_MAX) % num + base;
+ return ((long) (conv_rand() * time(NULL)) & CONV_RAND_MAX) % num + base;
}
/*--------------------------------------------------------------------------*/
@@ -231,14 +231,14 @@ static void write_example_passwd(char *pwfile, char pwlocation,
char *read_pwd (struct passwd *pw, int *pwtype)
{
- FILE * f = 0;
+ FILE * f = NULL;
struct stat statbuf;
char pwfile[PATH_MAX + 1];
int len;
char pwlocation;
char buf[2048];
int only_systempw = 0;
- char *pass = 0;
+ char *pass = NULL;
char *p_buf;
char *p;
@@ -364,7 +364,7 @@ char *read_pwd (struct passwd *pw, int *pwtype)
} else if ( (*pwtype & PW_UNIX) && (!Strcasecmp(p_buf, "unix") ) ) {
fclose(f);
*pwtype = PW_UNIX;
- return 0;
+ return NULL;
}
}
}
@@ -388,5 +388,5 @@ found:
end:
*pwtype = (((*pwtype) & PW_CLEARTEXT) ? PW_CLEARTEXT : 0);
/* ^ may allow cleartext? - then cleartext, else deny */
- return 0;
+ return NULL;
}