summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/stdio.c
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2004-09-28 18:12:43 +0000
committerotto <otto@openbsd.org>2004-09-28 18:12:43 +0000
commit4e503363ea24eb948007e522d9ad8e1f643f3b3e (patch)
tree5da40ac25045720192f4bedcf0c8cbadb6352dfd /lib/libc/stdio/stdio.c
parentFix unsigned {int, long, long long} to long double conversions for (diff)
downloadwireguard-openbsd-4e503363ea24eb948007e522d9ad8e1f643f3b3e.tar.xz
wireguard-openbsd-4e503363ea24eb948007e522d9ad8e1f643f3b3e.zip
deregister + ansify, no change in object code. ok deraadt@ millert@
Diffstat (limited to 'lib/libc/stdio/stdio.c')
-rw-r--r--lib/libc/stdio/stdio.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/lib/libc/stdio/stdio.c b/lib/libc/stdio/stdio.c
index c2c2271ed50..b0605e45057 100644
--- a/lib/libc/stdio/stdio.c
+++ b/lib/libc/stdio/stdio.c
@@ -31,7 +31,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: stdio.c,v 1.5 2003/06/02 20:18:37 millert Exp $";
+static char rcsid[] = "$OpenBSD: stdio.c,v 1.6 2004/09/28 18:12:44 otto Exp $";
#endif /* LIBC_SCCS and not lint */
#include <fcntl.h>
@@ -44,13 +44,10 @@ static char rcsid[] = "$OpenBSD: stdio.c,v 1.5 2003/06/02 20:18:37 millert Exp $
* These maintain the `known seek offset' for seek optimisation.
*/
int
-__sread(cookie, buf, n)
- void *cookie;
- char *buf;
- int n;
+__sread(void *cookie, char *buf, int n)
{
- register FILE *fp = cookie;
- register int ret;
+ FILE *fp = cookie;
+ int ret;
ret = read(fp->_file, buf, n);
/* if the read succeeded, update the current offset */
@@ -62,12 +59,9 @@ __sread(cookie, buf, n)
}
int
-__swrite(cookie, buf, n)
- void *cookie;
- char const *buf;
- int n;
+__swrite(void *cookie, char const *buf, int n)
{
- register FILE *fp = cookie;
+ FILE *fp = cookie;
if (fp->_flags & __SAPP)
(void) lseek(fp->_file, (off_t)0, SEEK_END);
@@ -76,13 +70,10 @@ __swrite(cookie, buf, n)
}
fpos_t
-__sseek(cookie, offset, whence)
- void *cookie;
- fpos_t offset;
- int whence;
+__sseek(void *cookie, fpos_t offset, int whence)
{
- register FILE *fp = cookie;
- register off_t ret;
+ FILE *fp = cookie;
+ off_t ret;
ret = lseek(fp->_file, (off_t)offset, whence);
if (ret == (off_t)-1)