- (dtucker) [openbsd-compat/getenv.c] Merge changes for __findenv from

OpenBSD getenv.c revs 1.4 - 1.8 (ANSIfication of arguments, removal of
   "register").
This commit is contained in:
Darren Tucker 2005-11-10 10:10:10 +11:00
parent 9b59ada7ca
commit b8c89d14bb
2 changed files with 12 additions and 7 deletions

View File

@ -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 $

View File

@ -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);