1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

Replace vattr_null() with VATTR_NULL() and do not explicity set vattr

fields to VNOVAL afterwards.
This commit is contained in:
Chris Costello 2000-06-15 17:19:22 +00:00
parent d78c2e654b
commit 3b5ec07347
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61712
2 changed files with 4 additions and 8 deletions

View File

@ -271,8 +271,7 @@ fdesc_getattr(ap)
switch (VTOFDESC(vp)->fd_type) {
case Froot:
bzero((caddr_t) vap, sizeof(*vap));
vattr_null(vap);
VATTR_NULL(vap);
vap->va_mode = S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH;
vap->va_type = VDIR;
@ -326,7 +325,7 @@ fdesc_getattr(ap)
case DTYPE_KQUEUE:
error = fo_stat(fp, &stb, ap->a_p);
if (error == 0) {
vattr_null(vap);
VATTR_NULL(vap);
if (fp->f_type == DTYPE_KQUEUE)
vap->va_type = VFIFO;
else
@ -337,7 +336,6 @@ fdesc_getattr(ap)
vap->va_nlink = 1;
vap->va_flags = 0;
vap->va_bytes = stb.st_blocks * stb.st_blksize;
vap->va_fsid = VNOVAL;
vap->va_fileid = VTOFDESC(vp)->fd_ix;
vap->va_size = stb.st_size;
vap->va_blocksize = stb.st_blksize;

View File

@ -271,8 +271,7 @@ fdesc_getattr(ap)
switch (VTOFDESC(vp)->fd_type) {
case Froot:
bzero((caddr_t) vap, sizeof(*vap));
vattr_null(vap);
VATTR_NULL(vap);
vap->va_mode = S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH;
vap->va_type = VDIR;
@ -326,7 +325,7 @@ fdesc_getattr(ap)
case DTYPE_KQUEUE:
error = fo_stat(fp, &stb, ap->a_p);
if (error == 0) {
vattr_null(vap);
VATTR_NULL(vap);
if (fp->f_type == DTYPE_KQUEUE)
vap->va_type = VFIFO;
else
@ -337,7 +336,6 @@ fdesc_getattr(ap)
vap->va_nlink = 1;
vap->va_flags = 0;
vap->va_bytes = stb.st_blocks * stb.st_blksize;
vap->va_fsid = VNOVAL;
vap->va_fileid = VTOFDESC(vp)->fd_ix;
vap->va_size = stb.st_size;
vap->va_blocksize = stb.st_blksize;