From: Todd C. Miller Date: Thu, 3 Oct 1996 23:53:22 +0000 (+0000) Subject: index -> strchr X-Git-Tag: SUDO_1_5_2~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=043a7ef1a9395d5cec348215def4278528cb971f;p=sudo index -> strchr remove unnecesary stuff --- diff --git a/putenv.c b/putenv.c index c86bfde23..0b61a4ea9 100644 --- a/putenv.c +++ b/putenv.c @@ -43,8 +43,6 @@ static char rcsid[] = "$Id$"; #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS) #include #endif /* HAVE_MALLOC_H && !STDC_HEADERS */ -#include -#include #include "compat.h" @@ -53,15 +51,6 @@ extern char *malloc __P((size_t)); #endif /* !STDC_HEADERS && !gcc */ -/* - * Since we can't count on this being defined... - */ -extern int errno; - - -int putenv __P((const char *)); - - /****************************************************************** * * putenv() @@ -84,7 +73,7 @@ int putenv(str) * find out how much of str to match when searching * for a string to replace. */ - if ((tmp = index(str, '=')) == NULL || tmp == str) + if ((tmp = strchr(str, '=')) == NULL || tmp == str) matchlen = strlen(str); else matchlen = (int) (tmp - str);