diff options
author | Alan Coopersmith <Alan.Coopersmith@sun.com> | 2006-06-28 22:26:50 +0000 |
---|---|---|
committer | Alan Coopersmith <Alan.Coopersmith@sun.com> | 2006-06-28 22:26:50 +0000 |
commit | 8274b8e4b121c3dc3bfd5d0fa4f85bc23f5c09a0 (patch) | |
tree | cb61869ef8db7fba494853286faba6a7901198ac /AuFileName.c | |
parent | 7f6f90cfce51806340f25b80a87b147d8a743b27 (diff) |
Remove prototype for XauGetAuthByName to clear lint warning: name declared
but never used or defined
Fix sparse warnings:
-warning: Using plain integer as NULL pointer
-warning: non-ANSI definition of function
Diffstat (limited to 'AuFileName.c')
-rw-r--r-- | AuFileName.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/AuFileName.c b/AuFileName.c index a51fc3b..b21b048 100644 --- a/AuFileName.c +++ b/AuFileName.c @@ -35,9 +35,9 @@ in this Software without prior written authorization from The Open Group. #include <stdlib.h> char * -XauFileName () +XauFileName (void) { - char *slashDotXauthority = "/.Xauthority"; + const char *slashDotXauthority = "/.Xauthority"; char *name; static char *buf; static int bsize; @@ -58,7 +58,7 @@ XauFileName () } if (!name) #endif - return 0; + return NULL; } size = strlen (name) + strlen(&slashDotXauthority[1]) + 2; if (size > bsize) { @@ -66,7 +66,7 @@ XauFileName () free (buf); buf = malloc ((unsigned) size); if (!buf) - return 0; + return NULL; bsize = size; } strcpy (buf, name); |