Run Nindent on com32/gpllib/dmi/dmi_battery.c
authorH. Peter Anvin <hpa@zytor.com>
Fri, 29 May 2009 22:10:21 +0000 (15:10 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Fri, 29 May 2009 22:10:21 +0000 (15:10 -0700)
Automatically reformat com32/gpllib/dmi/dmi_battery.c using Nindent.

Do this for all files except HDT, gPXE and externally maintained
libraries (zlib, tinyjpeg, libpng).

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
com32/gpllib/dmi/dmi_battery.c

index 02b5e6d..b0eab9b 100644 (file)
 #include <stdio.h>
 const char *dmi_battery_chemistry(uint8_t code)
 {
-        /* 3.3.23.1 */
-        static const char *chemistry[] = {
-                "Other", /* 0x01 */
-                "Unknown",
-                "Lead Acid",
-                "Nickel Cadmium",
-                "Nickel Metal Hydride",
-                "Lithium Ion",
-                "Zinc Air",
-                "Lithium Polymer" /* 0x08 */
-        };
+    /* 3.3.23.1 */
+    static const char *chemistry[] = {
+       "Other",                /* 0x01 */
+       "Unknown",
+       "Lead Acid",
+       "Nickel Cadmium",
+       "Nickel Metal Hydride",
+       "Lithium Ion",
+       "Zinc Air",
+       "Lithium Polymer"       /* 0x08 */
+    };
 
-        if (code >= 0x01 && code <= 0x08)
-                return chemistry[code - 0x01];
-        return out_of_spec;
+    if (code >= 0x01 && code <= 0x08)
+       return chemistry[code - 0x01];
+    return out_of_spec;
 }
 
-void dmi_battery_capacity(uint16_t code, uint8_t multiplier,char *capacity)
+void dmi_battery_capacity(uint16_t code, uint8_t multiplier, char *capacity)
 {
-        if (code == 0)
-                sprintf(capacity,"%s","Unknown");
-        else
-                sprintf(capacity,"%u mWh", code * multiplier);
+    if (code == 0)
+       sprintf(capacity, "%s", "Unknown");
+    else
+       sprintf(capacity, "%u mWh", code * multiplier);
 }
 
 void dmi_battery_voltage(uint16_t code, char *voltage)
 {
-        if (code == 0)
-                sprintf(voltage,"%s","Unknown");
-        else
-                sprintf(voltage,"%u mV", code);
+    if (code == 0)
+       sprintf(voltage, "%s", "Unknown");
+    else
+       sprintf(voltage, "%u mV", code);
 }
 
 void dmi_battery_maximum_error(uint8_t code, char *error)
 {
-        if (code == 0xFF)
-                sprintf(error,"%s","Unknown");
-        else
-                sprintf(error,"%u%%", code);
+    if (code == 0xFF)
+       sprintf(error, "%s", "Unknown");
+    else
+       sprintf(error, "%u%%", code);
 }