summaryrefslogtreecommitdiff
path: root/auth.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2006-07-14 13:05:52 -0700
committerAlan Coopersmith <alanc@alf.(none)>2006-07-14 13:05:52 -0700
commit5283b118b4bfdb1a85356147701f602b884c342b (patch)
tree8751ba258d8a74ee929b87887393be369ba2091f /auth.c
parent41211f8c849de67cebeb9d9f7516eb5a4a7eb3cf (diff)
Fix many sparse warnings of: Using plain integer as NULL pointer
Also fixes Login.c:1329:5: warning: mixing declarations and code from extra ;
Diffstat (limited to 'auth.c')
-rw-r--r--auth.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/auth.c b/auth.c
index f12d923..da0d3dd 100644
--- a/auth.c
+++ b/auth.c
@@ -183,7 +183,7 @@ static Xauth *
GenerateAuthorization (unsigned short name_length, char *name)
{
struct AuthProtocol *a;
- Xauth *auth = 0;
+ Xauth *auth = NULL;
int i;
Debug ("GenerateAuthorization %*.*s\n",
@@ -228,7 +228,7 @@ SetProtoDisplayAuthorization (
Xauth *auth;
a = findProtocol (authorizationNameLen, authorizationName);
- pdpy->xdmcpAuthorization = pdpy->fileAuthorization = 0;
+ pdpy->xdmcpAuthorization = pdpy->fileAuthorization = NULL;
if (a)
{
if (!a->inited)
@@ -245,7 +245,7 @@ SetProtoDisplayAuthorization (
{
auth = (*a->GetAuth) (authorizationNameLen, authorizationName);
pdpy->fileAuthorization = auth;
- pdpy->xdmcpAuthorization = 0;
+ pdpy->xdmcpAuthorization = NULL;
}
if (auth)
Debug ("Got %p (%d %*.*s)\n", auth,
@@ -563,7 +563,7 @@ static struct addrList *addrs;
static void
initAddrs (void)
{
- addrs = 0;
+ addrs = NULL;
}
static void
@@ -601,7 +601,7 @@ saveEntry (Xauth *auth)
}
memmove( new->address, auth->address, (int) auth->address_length);
} else
- new->address = 0;
+ new->address = NULL;
if ((new->number_length = auth->number_length) > 0) {
new->number = malloc (auth->number_length);
if (!new->number) {
@@ -612,7 +612,7 @@ saveEntry (Xauth *auth)
}
memmove( new->number, auth->number, (int) auth->number_length);
} else
- new->number = 0;
+ new->number = NULL;
if ((new->name_length = auth->name_length) > 0) {
new->name = malloc (auth->name_length);
if (!new->name) {
@@ -624,7 +624,7 @@ saveEntry (Xauth *auth)
}
memmove( new->name, auth->name, (int) auth->name_length);
} else
- new->name = 0;
+ new->name = NULL;
new->family = auth->family;
new->next = addrs;
addrs = new;
@@ -1211,9 +1211,9 @@ SetUserAuthorization (struct display *d, struct verify_info *verify)
{
FILE *old = NULL, *new;
char home_name[1024], backup_name[1024], new_name[1024];
- char *name = 0;
+ char *name = NULL;
char *home;
- char *envname = 0;
+ char *envname = NULL;
int lockStatus;
Xauth *entry, **auths;
int setenv = 0;