dtlogin: start to resolve static analysis warnings
Also convert some K&R function declarations to ansi
This commit is contained in:
@@ -164,8 +164,8 @@ longtochars (l, c)
|
||||
c[3] = l & 0xff;
|
||||
}
|
||||
|
||||
static
|
||||
InitXdmcpWrapper ()
|
||||
static void
|
||||
InitXdmcpWrapper (void)
|
||||
{
|
||||
long sum[2];
|
||||
unsigned char tmpkey[8];
|
||||
@@ -194,25 +194,22 @@ InitXdmcpWrapper ()
|
||||
static unsigned long int next = 1;
|
||||
|
||||
static int
|
||||
xdm_rand()
|
||||
xdm_rand(void)
|
||||
{
|
||||
next = next * 1103515245 + 12345;
|
||||
return (unsigned int)(next/65536) % 32768;
|
||||
}
|
||||
|
||||
static void
|
||||
xdm_srand(seed)
|
||||
unsigned int seed;
|
||||
xdm_srand(unsigned int seed)
|
||||
{
|
||||
next = seed;
|
||||
}
|
||||
#endif /* no HASXDMAUTH */
|
||||
|
||||
#ifdef USE_ENCRYPT
|
||||
static
|
||||
bitsToBytes (bits, bytes)
|
||||
unsigned long bits[2];
|
||||
char bytes[64];
|
||||
static void
|
||||
bitsToBytes (unsigned long bits[2], char bytes[64])
|
||||
{
|
||||
int bit, byte;
|
||||
int i;
|
||||
@@ -233,7 +230,8 @@ char bytes[64];
|
||||
#if defined(linux) || defined(CSRG_BASED) || defined(sun)
|
||||
#define READ_LIMIT (sizeof (long) * 2)
|
||||
|
||||
static sumFile (char *name, long sum[2])
|
||||
static int
|
||||
sumFile (char *name, long sum[2])
|
||||
{
|
||||
long buf[2];
|
||||
int fd;
|
||||
@@ -272,10 +270,8 @@ static sumFile (char *name, long sum[2])
|
||||
|
||||
#else /* linux || CSRG_BASED */
|
||||
|
||||
static
|
||||
sumFile (name, sum)
|
||||
char *name;
|
||||
long sum[2];
|
||||
static int
|
||||
sumFile (char *name, long sum[2])
|
||||
{
|
||||
long buf[1024*2];
|
||||
int cnt;
|
||||
@@ -311,9 +307,8 @@ long sum[2];
|
||||
}
|
||||
#endif /* linux || CSRG_BASED */
|
||||
|
||||
GenerateAuthData (auth, len)
|
||||
char *auth;
|
||||
int len;
|
||||
void
|
||||
GenerateAuthData (char *auth, int len)
|
||||
{
|
||||
long ldata[2];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user