Commit 6076485f authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

msi: Simplify the code.

parent 3c444ea3
......@@ -4587,30 +4587,20 @@ static LONG env_set_flags( LPCWSTR *name, LPWSTR *value, DWORD *flags )
static const WCHAR prefix[] = {'[','~',']',0};
*flags = 0;
while (*cptr && (*cptr == '=' || *cptr == '+' ||
*cptr == '-' || *cptr == '!' || *cptr == '*'))
while (*cptr)
{
switch (*cptr)
{
case '=':
if (*cptr == '=')
*flags |= ENV_ACT_SETALWAYS;
break;
case '+':
else if (*cptr == '+')
*flags |= ENV_ACT_SETABSENT;
break;
case '-':
else if (*cptr == '-')
*flags |= ENV_ACT_REMOVE;
break;
case '!':
else if (*cptr == '!')
*flags |= ENV_ACT_REMOVEMATCH;
break;
case '*':
else if (*cptr == '*')
*flags |= ENV_MOD_MACHINE;
else
break;
default:
ERR("Unknown Environment flag: %c\n", *cptr);
return ERROR_FUNCTION_FAILED;
}
cptr++;
(*name)++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment