mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-17 18:21:03 +03:00
Suppress GCC 6 warning about ambiguous 'else' with -Wparentheses
This commit is contained in:
committed by
Florian Weimer
parent
f8da6e93a6
commit
df1cf48777
@ -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;
|
||||
{
|
||||
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;
|
||||
do
|
||||
dp[0] = dp[1];
|
||||
while (*dp++);
|
||||
/* Continue the loop in case NAME appears again. */
|
||||
}
|
||||
else
|
||||
++ep;
|
||||
}
|
||||
|
||||
UNLOCK;
|
||||
|
||||
|
Reference in New Issue
Block a user