about summary refs log tree commit diff
path: root/stdlib/setenv.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/setenv.c')
-rw-r--r--stdlib/setenv.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/stdlib/setenv.c b/stdlib/setenv.c
index b9e0ba808d..7a87d642c5 100644
--- a/stdlib/setenv.c
+++ b/stdlib/setenv.c
@@ -289,18 +289,20 @@ unsetenv (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;