summaryrefslogtreecommitdiff
path: root/sys/lib/libsa/fstat.c
diff options
context:
space:
mode:
authorisaki <isaki@NetBSD.org>2007-11-24 13:20:53 +0000
committerisaki <isaki@NetBSD.org>2007-11-24 13:20:53 +0000
commit1c038e6834cae6806ebb97ae00a41d67e4d72ae1 (patch)
treeeab430c54f7ca1bc68225b960a8f82356c93bf2f /sys/lib/libsa/fstat.c
parent9ce1f92af748ec8139d3601fdf3b136b600eb57f (diff)
style, indent, and ANSI-fy.
Diffstat (limited to 'sys/lib/libsa/fstat.c')
-rw-r--r--sys/lib/libsa/fstat.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/lib/libsa/fstat.c b/sys/lib/libsa/fstat.c
index 6418258e4da..398ba64a13f 100644
--- a/sys/lib/libsa/fstat.c
+++ b/sys/lib/libsa/fstat.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fstat.c,v 1.5 2005/12/11 12:24:46 christos Exp $ */
+/* $NetBSD: fstat.c,v 1.6 2007/11/24 13:20:55 isaki Exp $ */
/*-
* Copyright (c) 1993
@@ -34,16 +34,14 @@
#include "stand.h"
int
-fstat(fd, sb)
- int fd;
- struct stat *sb;
+fstat(int fd, struct stat *sb)
{
struct open_file *f = &files[fd];
#if !defined(LIBSA_NO_FD_CHECKING)
if ((unsigned)fd >= SOPEN_MAX || f->f_flags == 0) {
errno = EBADF;
- return (-1);
+ return -1;
}
#endif
@@ -51,10 +49,10 @@ fstat(fd, sb)
/* operation not defined on raw devices */
if (f->f_flags & F_RAW) {
errno = EOPNOTSUPP;
- return (-1);
+ return -1;
}
#endif
errno = FS_STAT(f->f_ops)(f, sb); /* XXX no point setting errno */
- return (0);
+ return 0;
}