From: H. Peter Anvin Date: Fri, 29 May 2009 22:10:21 +0000 (-0700) Subject: Run Nindent on com32/gpllib/dmi/dmi_battery.c X-Git-Tag: syslinux-3.83-pre2~403 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=090c37b1f81dd02d3d5387a5ee09a5cb7d5a225c;p=platform%2Fupstream%2Fsyslinux.git Run Nindent on com32/gpllib/dmi/dmi_battery.c 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 --- diff --git a/com32/gpllib/dmi/dmi_battery.c b/com32/gpllib/dmi/dmi_battery.c index 02b5e6d..b0eab9b 100644 --- a/com32/gpllib/dmi/dmi_battery.c +++ b/com32/gpllib/dmi/dmi_battery.c @@ -30,43 +30,43 @@ #include 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); }