]> granicus.if.org Git - sudo/commitdiff
index -> strchr
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 3 Oct 1996 23:53:22 +0000 (23:53 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 3 Oct 1996 23:53:22 +0000 (23:53 +0000)
remove unnecesary stuff

putenv.c

index c86bfde232cd85da6a93f84a1357f70db12af25d..0b61a4ea997a834465d96687c5e608a432873851 100644 (file)
--- a/putenv.c
+++ b/putenv.c
@@ -43,8 +43,6 @@ static char rcsid[] = "$Id$";
 #if defined(HAVE_MALLOC_H) && !defined(STDC_HEADERS)
 #include <malloc.h>
 #endif /* HAVE_MALLOC_H && !STDC_HEADERS */
-#include <errno.h>
-#include <sys/param.h>
 
 #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);