]> Git Repo - uclibc-ng.git/commitdiff
Rewrite getenv
authorEric Andersen <[email protected]>
Wed, 7 Aug 2002 13:04:32 +0000 (13:04 -0000)
committerEric Andersen <[email protected]>
Wed, 7 Aug 2002 13:04:32 +0000 (13:04 -0000)
libc/stdlib/getenv.c [deleted file]

diff --git a/libc/stdlib/getenv.c b/libc/stdlib/getenv.c
deleted file mode 100644 (file)
index 588f696..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (C) 1995,1996 Robert de Bath <[email protected]>
- * This file is part of the Linux-8086 C library and is distributed
- * under the GNU Library General Public License.
- */
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <malloc.h>
-
-char *getenv(const char *var)
-{
-    char **p;
-    int len;
-
-    len = strlen(var);
-
-    if (!__environ)
-       return NULL;
-
-    for (p = __environ; *p; p++) {
-       if (memcmp(var, *p, len) == 0 && (*p)[len] == '=')
-           return *p + len + 1;
-    }
-    return NULL;
-}
This page took 0.025168 seconds and 4 git commands to generate.