diff --git a/shell/ash.c b/shell/ash.c index f9d59e50e..e24b74c03 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -14312,9 +14312,9 @@ procargs(char **argv) } if (mflag == 2) mflag = iflag; + /* Unset options which weren't explicitly set or unset */ for (i = 0; i < NOPTS; i++) - if (optlist[i] == 2) - optlist[i] = 0; + optlist[i] &= 1; /* same effect as "if (optlist[i] == 2) optlist[i] = 0;" */ #if DEBUG == 2 debug = 1; #endif