From b8c89d14bbd6ea20e1ef785adcfd27d067009f3d Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 10 Nov 2005 10:10:10 +1100 Subject: [PATCH] - (dtucker) [openbsd-compat/getenv.c] Merge changes for __findenv from OpenBSD getenv.c revs 1.4 - 1.8 (ANSIfication of arguments, removal of "register"). --- ChangeLog | 7 ++++++- openbsd-compat/setenv.c | 12 ++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8270f8c68..1ce552d71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +20051110 + - (dtucker) [openbsd-compat/getenv.c] Merge changes for __findenv from + OpenBSD getenv.c revs 1.4 - 1.8 (ANSIfication of arguments, removal of + "register"). + 20051105 - (djm) OpenBSD CVS Sync - markus@cvs.openbsd.org 2005/10/07 11:13:57 @@ -3239,4 +3244,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.3954 2005/11/05 05:56:52 djm Exp $ +$Id: ChangeLog,v 1.3955 2005/11/09 23:10:10 dtucker Exp $ diff --git a/openbsd-compat/setenv.c b/openbsd-compat/setenv.c index c3a86c651..9f746ded0 100644 --- a/openbsd-compat/setenv.c +++ b/openbsd-compat/setenv.c @@ -41,6 +41,8 @@ static char *rcsid = "$OpenBSD: setenv.c,v 1.6 2003/06/02 20:18:38 millert Exp $ char *__findenv(const char *name, int *offset); +/* OpenSSH Portable: __findenv is from getenv.c rev 1.8 */ + /* * __findenv -- * Returns pointer to value associated with name, if any, else NULL. @@ -51,14 +53,12 @@ char *__findenv(const char *name, int *offset); * 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; - register const char *np; - register char **p, *cp; + int len, i; + const char *np; + char **p, *cp; if (name == NULL || environ == NULL) return (NULL);