X-Git-Url: http://andersk.mit.edu/gitweb/gssapi-openssh.git/blobdiff_plain/12408a1b16c3ce5b7e203bec879ceb3d67ae09a8..d76f17672018832a885e3ce6087123d85bda0bca:/openssh/openbsd-compat/setenv.c diff --git a/openssh/openbsd-compat/setenv.c b/openssh/openbsd-compat/setenv.c index b7ba0ce..ac9670b 100644 --- a/openssh/openbsd-compat/setenv.c +++ b/openssh/openbsd-compat/setenv.c @@ -1,5 +1,3 @@ -/* OPENBSD ORIGINAL: lib/libc/stdlib/setenv.c */ - /* * Copyright (c) 1987 Regents of the University of California. * All rights reserved. @@ -12,7 +10,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -29,18 +31,16 @@ * SUCH DAMAGE. */ -#include "includes.h" +#include "config.h" #ifndef HAVE_SETENV #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: setenv.c,v 1.6 2003/06/02 20:18:38 millert Exp $"; +static char *rcsid = "$OpenBSD: setenv.c,v 1.3 1998/02/02 22:44:53 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include #include -char *__findenv(const char *name, int *offset); - /* * __findenv -- * Returns pointer to value associated with name, if any, else NULL. @@ -92,6 +92,7 @@ setenv(name, value, rewrite) static int alloced; /* if allocated space before */ register char *C; int l_value, offset; + char *__findenv(); if (*value == '=') /* no `=' in value */ ++value; @@ -100,8 +101,7 @@ setenv(name, value, rewrite) if (!rewrite) return (0); if (strlen(C) >= l_value) { /* old larger; copy over */ - while ((*C++ = *value++)) - ; + while ((*C++ = *value++)); return (0); } } else { /* create new slot */