summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/getenv.c
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-12-10 22:44:14 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-12-10 22:44:14 +0000
commit08f7006520940acb78a7529a6d81d985ae7e97ec (patch)
tree2fa45557b16d48b56f9c86543e9b7af6723a101b /lib/libc/stdlib/getenv.c
parent94b067c98f66a210b19feef7605b05cd985743a4 (diff)
use proper __findenv() prototype; millert@ ok
Diffstat (limited to 'lib/libc/stdlib/getenv.c')
-rw-r--r--lib/libc/stdlib/getenv.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/libc/stdlib/getenv.c b/lib/libc/stdlib/getenv.c
index 4db86df915f..934f10928f6 100644
--- a/lib/libc/stdlib/getenv.c
+++ b/lib/libc/stdlib/getenv.c
@@ -32,12 +32,14 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: getenv.c,v 1.4 1998/07/16 18:02:33 deraadt Exp $";
+static char *rcsid = "$OpenBSD: getenv.c,v 1.5 2002/12/10 22:44:12 mickey Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdlib.h>
#include <string.h>
+char *__findenv(const char *name, int *offset);
+
/*
* __findenv --
* Returns pointer to value associated with name, if any, else NULL.
@@ -48,9 +50,7 @@ static char *rcsid = "$OpenBSD: getenv.c,v 1.4 1998/07/16 18:02:33 deraadt Exp $
* This routine *should* be a static; don't use it.
*/
char *
-__findenv(name, offset)
- register const char *name;
- int *offset;
+__findenv(const char *name, int *offset)
{
extern char **environ;
register int len, i;
@@ -83,7 +83,6 @@ getenv(name)
const char *name;
{
int offset;
- char *__findenv();
- return(__findenv(name, &offset));
+ return (__findenv(name, &offset));
}