diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-09-16 03:16:51 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-09-16 03:16:51 +0000 |
commit | 6039c2aac517c3a69580eb1329ef77640175a540 (patch) | |
tree | 5d7a00aa29e2a43ded3b87a0cf910a9f4bfb8e9c | |
parent | ee84e00f02217904f6f2c84732f1302878273ce2 (diff) |
ansi
-rw-r--r-- | lib/libc/net/getservbyname.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/lib/libc/net/getservbyname.c b/lib/libc/net/getservbyname.c index f1c312ea82a..c5f42a7b9cf 100644 --- a/lib/libc/net/getservbyname.c +++ b/lib/libc/net/getservbyname.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getservbyname.c,v 1.6 2003/06/02 20:18:35 millert Exp $"; +static char rcsid[] = "$OpenBSD: getservbyname.c,v 1.7 2004/09/16 03:16:50 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <netdb.h> @@ -40,14 +40,11 @@ extern int _serv_stayopen; _THREAD_PRIVATE_MUTEX(getservbyname_r); struct servent * -getservbyname_r(name, proto, se, buf, buflen) - const char *name, *proto; - struct servent *se; - char *buf; - int buflen; +getservbyname_r(const char *name, const char *proto, struct servent *se, + char *buf, int buflen) { - register struct servent *p; - register char **cp; + struct servent *p; + char **cp; _THREAD_PRIVATE_MUTEX_LOCK(getservbyname_r); setservent(_serv_stayopen); @@ -68,8 +65,8 @@ gotname: return (p); } -struct servent *getservbyname(name, proto) - const char *name, *proto; +struct servent * +getservbyname(const char *name, const char *proto) { _THREAD_PRIVATE_KEY(getservbyname); static char buf[4096]; @@ -78,6 +75,6 @@ struct servent *getservbyname(name, proto) if (bufp == NULL) return (NULL); return getservbyname_r(name, proto, (struct servent*) bufp, - bufp + sizeof(struct servent), - sizeof buf - sizeof(struct servent) ); + bufp + sizeof(struct servent), + sizeof buf - sizeof(struct servent) ); } |