summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkstailey <kstailey@openbsd.org>1997-06-17 20:34:43 +0000
committerkstailey <kstailey@openbsd.org>1997-06-17 20:34:43 +0000
commit4a4368796d51fb921b4bf302d28fa07b80b2108c (patch)
treea5b759ca9a1dc0bf97a48fd5631b7ecff15b4731
parentminor cleanup (diff)
downloadwireguard-openbsd-4a4368796d51fb921b4bf302d28fa07b80b2108c.tar.xz
wireguard-openbsd-4a4368796d51fb921b4bf302d28fa07b80b2108c.zip
(foo *)NULL -> NULL
-rw-r--r--usr.bin/ar/archive.c4
-rw-r--r--usr.bin/ar/delete.c6
-rw-r--r--usr.bin/ar/move.c10
-rw-r--r--usr.bin/ar/replace.c8
-rw-r--r--usr.bin/at/at.c6
-rw-r--r--usr.bin/chpass/chpass.c14
-rw-r--r--usr.bin/chpass/edit.c6
-rw-r--r--usr.bin/chpass/util.c8
-rw-r--r--usr.bin/ftp/ftp.c12
-rw-r--r--usr.bin/make/arch.c51
-rw-r--r--usr.bin/more/more.c10
-rw-r--r--usr.bin/rdistd/filesys-os.c24
12 files changed, 79 insertions, 80 deletions
diff --git a/usr.bin/ar/archive.c b/usr.bin/ar/archive.c
index e437bdb9fa1..44776658572 100644
--- a/usr.bin/ar/archive.c
+++ b/usr.bin/ar/archive.c
@@ -1,5 +1,5 @@
/* $NetBSD: archive.c,v 1.7 1995/03/26 03:27:46 glass Exp $ */
-/* $OpenBSD: archive.c,v 1.3 1997/05/31 08:17:18 deraadt Exp $ */
+/* $OpenBSD: archive.c,v 1.4 1997/06/17 20:47:08 kstailey Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -125,7 +125,7 @@ close_archive(fd)
#define AR_ATOI(from, to, len, base) { \
memmove(buf, from, len); \
buf[len] = '\0'; \
- to = strtol(buf, (char **)NULL, base); \
+ to = strtol(buf, NULL, base); \
}
/*
diff --git a/usr.bin/ar/delete.c b/usr.bin/ar/delete.c
index b138dacbab0..ed9034b6978 100644
--- a/usr.bin/ar/delete.c
+++ b/usr.bin/ar/delete.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: delete.c,v 1.2 1996/06/26 05:31:19 deraadt Exp $ */
+/* $OpenBSD: delete.c,v 1.3 1997/06/17 20:47:09 kstailey Exp $ */
/* $NetBSD: delete.c,v 1.5 1995/03/26 03:27:52 glass Exp $ */
/*-
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)delete.c 8.3 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: delete.c,v 1.2 1996/06/26 05:31:19 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: delete.c,v 1.3 1997/06/17 20:47:09 kstailey Exp $";
#endif
#endif /* not lint */
@@ -83,7 +83,7 @@ delete(argv)
skip_arobj(afd);
continue;
}
- put_arobj(&cf, (struct stat *)NULL);
+ put_arobj(&cf, NULL);
}
size = lseek(tfd, (off_t)0, SEEK_CUR);
diff --git a/usr.bin/ar/move.c b/usr.bin/ar/move.c
index 7bc1d7668a0..d99f1c3a483 100644
--- a/usr.bin/ar/move.c
+++ b/usr.bin/ar/move.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: move.c,v 1.2 1996/06/26 05:31:21 deraadt Exp $ */
+/* $OpenBSD: move.c,v 1.3 1997/06/17 20:47:09 kstailey Exp $ */
/* $NetBSD: move.c,v 1.5 1995/03/26 03:27:57 glass Exp $ */
/*-
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)move.c 8.3 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: move.c,v 1.2 1996/06/26 05:31:21 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: move.c,v 1.3 1997/06/17 20:47:09 kstailey Exp $";
#endif
#endif /* not lint */
@@ -97,7 +97,7 @@ move(argv)
if (options & AR_V)
(void)printf("m - %s\n", file);
cf.wfd = tfd2;
- put_arobj(&cf, (struct stat *)NULL);
+ put_arobj(&cf, NULL);
continue;
}
if (mods && compare(posname)) {
@@ -105,12 +105,12 @@ move(argv)
if (options & AR_B)
curfd = tfd3;
cf.wfd = curfd;
- put_arobj(&cf, (struct stat *)NULL);
+ put_arobj(&cf, NULL);
if (options & AR_A)
curfd = tfd3;
} else {
cf.wfd = curfd;
- put_arobj(&cf, (struct stat *)NULL);
+ put_arobj(&cf, NULL);
}
}
diff --git a/usr.bin/ar/replace.c b/usr.bin/ar/replace.c
index efce3c37d75..62f6975498a 100644
--- a/usr.bin/ar/replace.c
+++ b/usr.bin/ar/replace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: replace.c,v 1.2 1996/06/26 05:31:23 deraadt Exp $ */
+/* $OpenBSD: replace.c,v 1.3 1997/06/17 20:47:09 kstailey Exp $ */
/* $NetBSD: replace.c,v 1.6 1995/03/26 03:28:01 glass Exp $ */
/*-
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)replace.c 8.3 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: replace.c,v 1.2 1996/06/26 05:31:23 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: replace.c,v 1.3 1997/06/17 20:47:09 kstailey Exp $";
#endif
#endif /* not lint */
@@ -131,13 +131,13 @@ replace(argv)
curfd = tfd2;
/* Read and write to an archive; pad on both. */
SETCF(afd, archive, curfd, tname, RPAD|WPAD);
- put_arobj(&cf, (struct stat *)NULL);
+ put_arobj(&cf, NULL);
if (options & AR_A)
curfd = tfd2;
} else {
/* Read and write to an archive; pad on both. */
useold: SETCF(afd, archive, curfd, tname, RPAD|WPAD);
- put_arobj(&cf, (struct stat *)NULL);
+ put_arobj(&cf, NULL);
}
}
diff --git a/usr.bin/at/at.c b/usr.bin/at/at.c
index 33c67f9b4e7..3cc692d2824 100644
--- a/usr.bin/at/at.c
+++ b/usr.bin/at/at.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: at.c,v 1.12 1997/06/12 16:57:44 kstailey Exp $ */
+/* $OpenBSD: at.c,v 1.13 1997/06/17 20:48:04 kstailey Exp $ */
/* $NetBSD: at.c,v 1.4 1995/03/25 18:13:31 glass Exp $ */
/*
@@ -73,7 +73,7 @@ enum { ATQ, ATRM, AT, BATCH, CAT }; /* what program we want to run */
/* File scope variables */
#ifndef lint
-static char rcsid[] = "$OpenBSD: at.c,v 1.12 1997/06/12 16:57:44 kstailey Exp $";
+static char rcsid[] = "$OpenBSD: at.c,v 1.13 1997/06/17 20:48:04 kstailey Exp $";
#endif
char *no_export[] =
@@ -292,7 +292,7 @@ writefile(runtimer, queue)
mailname = pass_entry->pw_name;
}
- if (atinput != (char *) NULL) {
+ if (atinput != NULL) {
fpin = freopen(atinput, "r", stdin);
if (fpin == NULL)
perr("Cannot open input file");
diff --git a/usr.bin/chpass/chpass.c b/usr.bin/chpass/chpass.c
index 44544e79d5d..099c805c3c3 100644
--- a/usr.bin/chpass/chpass.c
+++ b/usr.bin/chpass/chpass.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: chpass.c,v 1.8 1997/02/13 17:28:39 deraadt Exp $ */
+/* $OpenBSD: chpass.c,v 1.9 1997/06/17 20:49:55 kstailey Exp $ */
/* $NetBSD: chpass.c,v 1.8 1996/05/15 21:50:43 jtc Exp $ */
/*-
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)chpass.c 8.4 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: chpass.c,v 1.8 1997/02/13 17:28:39 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: chpass.c,v 1.9 1997/06/17 20:49:55 kstailey Exp $";
#endif
#endif /* not lint */
@@ -164,15 +164,15 @@ main(argc, argv)
/* protect p_shell -- it thinks NULL is /bin/sh */
if (!arg[0])
usage();
- if (p_shell(arg, pw, (ENTRY *)NULL))
- pw_error((char *)NULL, 0, 1);
+ if (p_shell(arg, pw, NULL))
+ pw_error(NULL, 0, 1);
}
if (op == LOADENTRY) {
if (uid)
baduser();
pw = &lpw;
- if (!pw_scan(arg, pw, (int *)NULL))
+ if (!pw_scan(arg, pw, NULL))
exit(1);
}
@@ -202,7 +202,7 @@ main(argc, argv)
#ifdef YP
if (use_yp) {
if (pw_yp(pw, uid)) {
- pw_error((char *)NULL, 0, 1);
+ pw_error(NULL, 0, 1);
exit(1);
} else {
pw_abort();
@@ -216,7 +216,7 @@ main(argc, argv)
/* Now finish the passwd file update. */
if (pw_mkdb() < 0)
- pw_error((char *)NULL, 0, 1);
+ pw_error(NULL, 0, 1);
}
exit(0);
diff --git a/usr.bin/chpass/edit.c b/usr.bin/chpass/edit.c
index ab4afd125a3..cc658801dea 100644
--- a/usr.bin/chpass/edit.c
+++ b/usr.bin/chpass/edit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: edit.c,v 1.11 1996/09/23 09:41:02 deraadt Exp $ */
+/* $OpenBSD: edit.c,v 1.12 1997/06/17 20:49:55 kstailey Exp $ */
/* $NetBSD: edit.c,v 1.6 1996/05/15 21:50:45 jtc Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)edit.c 8.3 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: edit.c,v 1.11 1996/09/23 09:41:02 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: edit.c,v 1.12 1997/06/17 20:49:55 kstailey Exp $";
#endif
#endif /* not lint */
@@ -225,5 +225,5 @@ bad: (void)fclose(fp);
}
free(p);
- return (pw_scan(buf, pw, (int *)NULL));
+ return (pw_scan(buf, pw, NULL));
}
diff --git a/usr.bin/chpass/util.c b/usr.bin/chpass/util.c
index 1bf5f6e483b..419e266905c 100644
--- a/usr.bin/chpass/util.c
+++ b/usr.bin/chpass/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.2 1996/06/26 05:31:59 deraadt Exp $ */
+/* $OpenBSD: util.c,v 1.3 1997/06/17 20:49:56 kstailey Exp $ */
/* $NetBSD: util.c,v 1.4 1995/03/26 04:55:35 glass Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)util.c 8.4 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: util.c,v 1.2 1996/06/26 05:31:59 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: util.c,v 1.3 1997/06/17 20:49:56 kstailey Exp $";
#endif
#endif /* not lint */
@@ -109,10 +109,10 @@ atot(p, store)
break;
}
}
- if (!(t = strtok((char *)NULL, " \t,")) || !isdigit(*t))
+ if (!(t = strtok(NULL, " \t,")) || !isdigit(*t))
goto bad;
day = atoi(t);
- if (!(t = strtok((char *)NULL, " \t,")) || !isdigit(*t))
+ if (!(t = strtok(NULL, " \t,")) || !isdigit(*t))
goto bad;
year = atoi(t);
if (day < 1 || day > 31 || month < 1 || month > 12 || !year)
diff --git a/usr.bin/ftp/ftp.c b/usr.bin/ftp/ftp.c
index 8a4d968f63d..03fe620ae39 100644
--- a/usr.bin/ftp/ftp.c
+++ b/usr.bin/ftp/ftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftp.c,v 1.18 1997/04/23 20:33:13 deraadt Exp $ */
+/* $OpenBSD: ftp.c,v 1.19 1997/06/17 20:40:40 kstailey Exp $ */
/* $NetBSD: ftp.c,v 1.25 1997/04/14 09:09:22 lukem Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94";
#else
-static char rcsid[] = "$OpenBSD: ftp.c,v 1.18 1997/04/23 20:33:13 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: ftp.c,v 1.19 1997/06/17 20:40:40 kstailey Exp $";
#endif
#endif /* not lint */
@@ -1410,7 +1410,7 @@ abort:
if (command("%s %s", cmd2, local) != PRELIM) {
pswitch(0);
if (cpend)
- abort_remote((FILE *) NULL);
+ abort_remote(NULL);
}
pswitch(1);
if (ptabflg)
@@ -1419,13 +1419,13 @@ abort:
return;
}
if (cpend)
- abort_remote((FILE *) NULL);
+ abort_remote(NULL);
pswitch(!proxy);
if (!cpend && !secndflag) { /* only if cmd = "RETR" (proxy=1) */
if (command("%s %s", cmd2, local) != PRELIM) {
pswitch(0);
if (cpend)
- abort_remote((FILE *) NULL);
+ abort_remote(NULL);
pswitch(1);
if (ptabflg)
code = -1;
@@ -1434,7 +1434,7 @@ abort:
}
}
if (cpend)
- abort_remote((FILE *) NULL);
+ abort_remote(NULL);
pswitch(!proxy);
if (cpend) {
FD_ZERO(&mask);
diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c
index ab0ecf65a38..58f01e50107 100644
--- a/usr.bin/make/arch.c
+++ b/usr.bin/make/arch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arch.c,v 1.9 1996/11/30 21:08:49 millert Exp $ */
+/* $OpenBSD: arch.c,v 1.10 1997/06/17 20:34:43 kstailey Exp $ */
/* $NetBSD: arch.c,v 1.17 1996/11/06 17:58:59 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94";
#else
-static char rcsid[] = "$OpenBSD: arch.c,v 1.9 1996/11/30 21:08:49 millert Exp $";
+static char rcsid[] = "$OpenBSD: arch.c,v 1.10 1997/06/17 20:34:43 kstailey Exp $";
#endif
#endif /* not lint */
@@ -153,7 +153,7 @@ ArchFree(ap)
/* Free memory from hash entries */
for (entry = Hash_EnumFirst(&a->members, &search);
- entry != (Hash_Entry *)NULL;
+ entry != NULL;
entry = Hash_EnumNext(&search))
free((Address) Hash_GetValue (entry));
@@ -481,9 +481,8 @@ ArchStatMember (archive, member, hash)
* the comparisons easier...
*/
cp = strrchr (member, '/');
- if (cp != (char *) NULL) {
+ if (cp != NULL)
member = cp + 1;
- }
ln = Lst_Find (archives, (ClientData) archive, ArchFindArchive);
if (ln != NILLNODE) {
@@ -491,7 +490,7 @@ ArchStatMember (archive, member, hash)
he = Hash_FindEntry (&ar->members, member);
- if (he != (Hash_Entry *) NULL) {
+ if (he != NULL) {
return ((struct ar_hdr *) Hash_GetValue (he));
} else {
/* Try truncated name */
@@ -505,7 +504,7 @@ ArchStatMember (archive, member, hash)
}
if ((he = Hash_FindEntry (&ar->members, copy)) != NULL)
return ((struct ar_hdr *) Hash_GetValue (he));
- return ((struct ar_hdr *) NULL);
+ return (NULL);
}
}
@@ -521,8 +520,8 @@ ArchStatMember (archive, member, hash)
arch = ArchFindMember(archive, member, &sarh, "r");
- if (arch == (FILE *)NULL) {
- return ((struct ar_hdr *)NULL);
+ if (arch == NULL) {
+ return (NULL);
} else {
fclose(arch);
return (&sarh);
@@ -534,8 +533,8 @@ ArchStatMember (archive, member, hash)
* everything that's in it and cache it so we can get at it quickly.
*/
arch = fopen (archive, "r");
- if (arch == (FILE *) NULL) {
- return ((struct ar_hdr *) NULL);
+ if (arch == NULL) {
+ return (NULL);
}
/*
@@ -545,7 +544,7 @@ ArchStatMember (archive, member, hash)
if ((fread (magic, SARMAG, 1, arch) != 1) ||
(strncmp (magic, ARMAG, SARMAG) != 0)) {
fclose (arch);
- return ((struct ar_hdr *) NULL);
+ return (NULL);
}
ar = (Arch *)emalloc (sizeof (Arch));
@@ -623,7 +622,7 @@ ArchStatMember (archive, member, hash)
}
#endif
- he = Hash_CreateEntry (&ar->members, memName, (Boolean *)NULL);
+ he = Hash_CreateEntry (&ar->members, memName, NULL);
Hash_SetValue (he, (ClientData)emalloc (sizeof (struct ar_hdr)));
memcpy ((Address)Hash_GetValue (he), (Address)&arh,
sizeof (struct ar_hdr));
@@ -641,10 +640,10 @@ ArchStatMember (archive, member, hash)
*/
he = Hash_FindEntry (&ar->members, member);
- if (he != (Hash_Entry *) NULL) {
+ if (he != NULL) {
return ((struct ar_hdr *) Hash_GetValue (he));
} else {
- return ((struct ar_hdr *) NULL);
+ return (NULL);
}
badarch:
@@ -653,7 +652,7 @@ badarch:
if (ar->fnametab)
free(ar->fnametab);
free ((Address)ar);
- return ((struct ar_hdr *) NULL);
+ return (NULL);
}
#ifdef SVR4ARCHIVES
@@ -793,8 +792,8 @@ ArchFindMember (archive, member, arhPtr, mode)
int len, tlen;
arch = fopen (archive, mode);
- if (arch == (FILE *) NULL) {
- return ((FILE *) NULL);
+ if (arch == NULL) {
+ return (NULL);
}
/*
@@ -804,7 +803,7 @@ ArchFindMember (archive, member, arhPtr, mode)
if ((fread (magic, SARMAG, 1, arch) != 1) ||
(strncmp (magic, ARMAG, SARMAG) != 0)) {
fclose (arch);
- return ((FILE *) NULL);
+ return (NULL);
}
/*
@@ -829,7 +828,7 @@ ArchFindMember (archive, member, arhPtr, mode)
* and there's no way we can recover...
*/
fclose (arch);
- return ((FILE *) NULL);
+ return (NULL);
} else if (strncmp (member, arhPtr->ar_name, tlen) == 0) {
/*
* If the member's name doesn't take up the entire 'name' field,
@@ -905,7 +904,7 @@ skip:
* archive and return NULL -- an error.
*/
fclose (arch);
- return ((FILE *) NULL);
+ return (NULL);
}
/*-
@@ -940,7 +939,7 @@ Arch_Touch (gn)
free(p2);
sprintf(arh.ar_date, "%-12ld", (long) now);
- if (arch != (FILE *) NULL) {
+ if (arch != NULL) {
(void)fwrite ((char *)&arh, sizeof (struct ar_hdr), 1, arch);
fclose (arch);
}
@@ -973,7 +972,7 @@ Arch_TouchLib (gn)
arch = ArchFindMember (gn->path, RANLIBMAG, &arh, "r+");
sprintf(arh.ar_date, "%-12ld", (long) now);
- if (arch != (FILE *) NULL) {
+ if (arch != NULL) {
(void)fwrite ((char *)&arh, sizeof (struct ar_hdr), 1, arch);
fclose (arch);
@@ -1013,7 +1012,7 @@ Arch_MTime (gn)
if (p2)
free(p2);
- if (arhPtr != (struct ar_hdr *) NULL) {
+ if (arhPtr != NULL) {
modTime = (int) strtol(arhPtr->ar_date, NULL, 10);
} else {
modTime = 0;
@@ -1120,7 +1119,7 @@ Arch_FindLib (gn, path)
#ifdef LIBRARIES
Var_Set (TARGET, gn->name, gn);
#else
- Var_Set (TARGET, gn->path == (char *) NULL ? gn->name : gn->path, gn);
+ Var_Set (TARGET, gn->path == NULL ? gn->name : gn->path, gn);
#endif /* LIBRARIES */
}
@@ -1177,7 +1176,7 @@ Arch_LibOODate (gn)
arhPtr = ArchStatMember (gn->path, RANLIBMAG, FALSE);
- if (arhPtr != (struct ar_hdr *)NULL) {
+ if (arhPtr != NULL) {
modTimeTOC = (int) strtol(arhPtr->ar_date, NULL, 10);
if (DEBUG(ARCH) || DEBUG(MAKE)) {
diff --git a/usr.bin/more/more.c b/usr.bin/more/more.c
index a53ee5563d8..c7f7741fbed 100644
--- a/usr.bin/more/more.c
+++ b/usr.bin/more/more.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: more.c,v 1.7 1997/01/17 07:12:53 millert Exp $ */
+/* $OpenBSD: more.c,v 1.8 1997/06/17 20:42:54 kstailey Exp $ */
/*-
* Copyright (c) 1980 The Regents of the University of California.
* All rights reserved.
@@ -375,19 +375,19 @@ checkf (fs, clearfirst)
if (clreol)
cleareol ();
perror(fs);
- return((FILE *)NULL);
+ return(NULL);
}
if ((stbuf.st_mode & S_IFMT) == S_IFDIR) {
prtf("\n*** %s: directory ***\n\n", fs);
- return((FILE *)NULL);
+ return(NULL);
}
if ((f = Fopen(fs, "r")) == NULL) {
(void)fflush(stdout);
perror(fs);
- return((FILE *)NULL);
+ return(NULL);
}
if (magic(f, fs))
- return((FILE *)NULL);
+ return(NULL);
c = Getc(f);
*clearfirst = c == '\f';
Ungetc (c, f);
diff --git a/usr.bin/rdistd/filesys-os.c b/usr.bin/rdistd/filesys-os.c
index fbf3fa6a723..b56ea6a42bf 100644
--- a/usr.bin/rdistd/filesys-os.c
+++ b/usr.bin/rdistd/filesys-os.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: filesys-os.c,v 1.3 1996/06/26 05:38:21 deraadt Exp $ */
+/* $OpenBSD: filesys-os.c,v 1.4 1997/06/17 20:37:53 kstailey Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -35,7 +35,7 @@
#ifndef lint
static char RCSid[] =
-"$OpenBSD: filesys-os.c,v 1.3 1996/06/26 05:38:21 deraadt Exp $";
+"$OpenBSD: filesys-os.c,v 1.4 1997/06/17 20:37:53 kstailey Exp $";
static char sccsid[] = "@(#)filesys-os.c";
@@ -88,7 +88,7 @@ FILE *setmountent(file, mode)
entries_left = mntctl(MCTL_QUERY, size, mntbuf);
if (!entries_left)
- return((FILE *)NULL);
+ return(NULL);
mnt = (struct vmount *)mntbuf;
return((FILE *) 1);
@@ -109,15 +109,15 @@ FILE *setmountent(file, mode)
if (mntbuf)
(void) free(mntbuf);
- size = getfsstat((struct statfs *) NULL, 0, MNT_WAIT);
+ size = getfsstat(NULL, 0, MNT_WAIT);
if (size == -1)
- return ((FILE *)NULL);
+ return (NULL);
size *= sizeof(struct statfs);
mntbuf = (char *) xmalloc(size);
entries_left = getfsstat((struct statfs *)mntbuf, size, MNT_WAIT);
if (entries_left == -1)
- return((FILE *) NULL);
+ return(NULL);
mnt = (struct statfs *) mntbuf;
@@ -216,7 +216,7 @@ void endmountent(fptr)
if (mntbuf) {
(void) free(mntbuf);
- mntbuf = (char *) NULL;
+ mntbuf = NULL;
}
}
#endif /* FSI_MNTCTL || FSI_GETFSSTAT */
@@ -275,7 +275,7 @@ mntent_t *getmountent(fptr)
return(&me);
} else
- return((mntent_t *) NULL);
+ return(NULL);
}
#endif /* FSI_GETMNTNET2 */
@@ -329,7 +329,7 @@ mntent_t *getmountent(fptr)
return(&me);
} else
- return((mntent_t *) NULL);
+ return(NULL);
}
#endif /* FSI_GETMNTNET */
@@ -368,8 +368,8 @@ mntent_t *getmountent(fptr)
static mntent_t me;
if (getmnt(&startmounts, &fs_data, sizeof(fs_data), NOSTAT_MANY,
- (char *) NULL) <= 0)
- return((mntent_t *) NULL);
+ NULL) <= 0)
+ return(NULL);
bzero((char *)&me, sizeof(mntent_t));
me.me_path = fs_data.fd_path;
@@ -394,7 +394,7 @@ mntent_t *newmountent(old)
mntent_t *new;
if (!old)
- return((mntent_t *) NULL);
+ return(NULL);
new = (mntent_t *) xcalloc(1, sizeof(mntent_t));
new->me_path = strdup(old->me_path);