Pārlūkot izejas kodu

Fix printing of flags

Due to an error when adding the different current definition types, the
flags configuration field never said (none).  Now it does once again,
and there's no trailing space when printing flags.
Clara Hobbs 6 gadus atpakaļ
vecāks
revīzija
ea710cc67d
1 mainītis faili ar 6 papildinājumiem un 6 dzēšanām
  1. 6
    6
      src/config.c

+ 6
- 6
src/config.c Parādīt failu

@@ -54,18 +54,18 @@ void pdbs_config_print(BaseSequentialStream *chp, const struct pdbs_config *cfg)
54 54
     }
55 55
 
56 56
     /* Print the flags */
57
-    chprintf(chp, "flags: ");
58
-    if (cfg->flags == 0) {
59
-        chprintf(chp, "(none)");
57
+    chprintf(chp, "flags:");
58
+    if ((cfg->flags & ~PDBS_CONFIG_FLAGS_CURRENT_DEFN) == 0) {
59
+        chprintf(chp, " (none)");
60 60
     }
61 61
     if (cfg->flags & PDBS_CONFIG_FLAGS_GIVEBACK) {
62
-        chprintf(chp, "GiveBack ");
62
+        chprintf(chp, " GiveBack");
63 63
     }
64 64
     if (cfg->flags & PDBS_CONFIG_FLAGS_VAR_BAT) {
65
-        chprintf(chp, "Var/Bat ");
65
+        chprintf(chp, " Var/Bat");
66 66
     }
67 67
     if (cfg->flags & PDBS_CONFIG_FLAGS_HV_PREFERRED) {
68
-        chprintf(chp, "HV_Preferred ");
68
+        chprintf(chp, " HV_Preferred");
69 69
     }
70 70
     chprintf(chp, "\r\n");
71 71
 

Notiek ielāde…
Atcelt
Saglabāt