=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rdistd/filesys-os.c,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** src/usr.bin/rdistd/filesys-os.c 1996/06/26 05:38:21 1.3 --- src/usr.bin/rdistd/filesys-os.c 1997/06/17 20:37:53 1.4 *************** *** 1,4 **** ! /* $OpenBSD: filesys-os.c,v 1.3 1996/06/26 05:38:21 deraadt Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. --- 1,4 ---- ! /* $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,41 **** #ifndef lint static char RCSid[] = ! "$OpenBSD: filesys-os.c,v 1.3 1996/06/26 05:38:21 deraadt Exp $"; static char sccsid[] = "@(#)filesys-os.c"; --- 35,41 ---- #ifndef lint static char RCSid[] = ! "$OpenBSD: filesys-os.c,v 1.4 1997/06/17 20:37:53 kstailey Exp $"; static char sccsid[] = "@(#)filesys-os.c"; *************** *** 88,94 **** entries_left = mntctl(MCTL_QUERY, size, mntbuf); if (!entries_left) ! return((FILE *)NULL); mnt = (struct vmount *)mntbuf; return((FILE *) 1); --- 88,94 ---- entries_left = mntctl(MCTL_QUERY, size, mntbuf); if (!entries_left) ! return(NULL); mnt = (struct vmount *)mntbuf; return((FILE *) 1); *************** *** 109,123 **** if (mntbuf) (void) free(mntbuf); ! size = getfsstat((struct statfs *) NULL, 0, MNT_WAIT); if (size == -1) ! return ((FILE *)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); mnt = (struct statfs *) mntbuf; --- 109,123 ---- if (mntbuf) (void) free(mntbuf); ! size = getfsstat(NULL, 0, MNT_WAIT); if (size == -1) ! return (NULL); size *= sizeof(struct statfs); mntbuf = (char *) xmalloc(size); entries_left = getfsstat((struct statfs *)mntbuf, size, MNT_WAIT); if (entries_left == -1) ! return(NULL); mnt = (struct statfs *) mntbuf; *************** *** 216,222 **** if (mntbuf) { (void) free(mntbuf); ! mntbuf = (char *) NULL; } } #endif /* FSI_MNTCTL || FSI_GETFSSTAT */ --- 216,222 ---- if (mntbuf) { (void) free(mntbuf); ! mntbuf = NULL; } } #endif /* FSI_MNTCTL || FSI_GETFSSTAT */ *************** *** 275,281 **** return(&me); } else ! return((mntent_t *) NULL); } #endif /* FSI_GETMNTNET2 */ --- 275,281 ---- return(&me); } else ! return(NULL); } #endif /* FSI_GETMNTNET2 */ *************** *** 329,335 **** return(&me); } else ! return((mntent_t *) NULL); } #endif /* FSI_GETMNTNET */ --- 329,335 ---- return(&me); } else ! return(NULL); } #endif /* FSI_GETMNTNET */ *************** *** 368,375 **** static mntent_t me; if (getmnt(&startmounts, &fs_data, sizeof(fs_data), NOSTAT_MANY, ! (char *) NULL) <= 0) ! return((mntent_t *) NULL); bzero((char *)&me, sizeof(mntent_t)); me.me_path = fs_data.fd_path; --- 368,375 ---- static mntent_t me; if (getmnt(&startmounts, &fs_data, sizeof(fs_data), NOSTAT_MANY, ! NULL) <= 0) ! return(NULL); bzero((char *)&me, sizeof(mntent_t)); me.me_path = fs_data.fd_path; *************** *** 394,400 **** mntent_t *new; if (!old) ! return((mntent_t *) NULL); new = (mntent_t *) xcalloc(1, sizeof(mntent_t)); new->me_path = strdup(old->me_path); --- 394,400 ---- mntent_t *new; if (!old) ! return(NULL); new = (mntent_t *) xcalloc(1, sizeof(mntent_t)); new->me_path = strdup(old->me_path);