Browse Source

Fix the clear_flags command

Due to a typo, it would clear all bits except the HV_Preferred bit.
This commit fixes the bug, and refactors the clearing code to make typos
like this harder to make.
Clara Hobbs 7 years ago
parent
commit
405fd466f2
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      src/shell.c

+ 3
- 3
src/shell.c View File

@@ -257,9 +257,9 @@ static void cmd_clear_flags(BaseSequentialStream *chp, int argc, char *argv[])
257 257
     }
258 258
 
259 259
     /* Clear all flags that can be toggled with toggle_* commands */
260
-    tmpcfg.flags &= ~PDBS_CONFIG_FLAGS_GIVEBACK
261
-        & ~PDBS_CONFIG_FLAGS_VAR_BAT
262
-        & PDBS_CONFIG_FLAGS_HV_PREFERRED;
260
+    tmpcfg.flags &= ~(PDBS_CONFIG_FLAGS_GIVEBACK
261
+            | PDBS_CONFIG_FLAGS_VAR_BAT
262
+            | PDBS_CONFIG_FLAGS_HV_PREFERRED);
263 263
 }
264 264
 
265 265
 static void cmd_toggle_giveback(BaseSequentialStream *chp, int argc, char *argv[])

Loading…
Cancel
Save