]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - stdlib/setenv.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / stdlib / setenv.c
index 3e68149ddfb9b5b30b5642fdd6c544d741ba1e9f..7a4efe5318a98d20423914d11e72fb9f0d30b3c3 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -278,18 +278,20 @@ unsetenv (const char *name)
   ep = __environ;
   if (ep != NULL)
     while (*ep != NULL)
-      if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
-       {
-         /* Found it.  Remove this pointer by moving later ones back.  */
-         char **dp = ep;
-
-         do
-           dp[0] = dp[1];
-         while (*dp++);
-         /* Continue the loop in case NAME appears again.  */
-       }
-      else
-       ++ep;
+      {
+       if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
+         {
+           /* Found it.  Remove this pointer by moving later ones back.  */
+           char **dp = ep;
+
+           do
+               dp[0] = dp[1];
+           while (*dp++);
+           /* Continue the loop in case NAME appears again.  */
+         }
+       else
+         ++ep;
+      }
 
   UNLOCK;