diff options
author | Jean Delvare <jdelvare@suse.de> | 2008-11-05 21:32:36 +0000 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2008-11-05 21:32:36 +0000 |
commit | ae0e7bf6f0010f404610a590e3a091928dc6a20f (patch) | |
tree | 81ce1e8fa99419456abe2aec2e48349f888a5139 | |
parent | 924eb38b401559b52826418f14995ca74f1aa2a5 (diff) | |
download | dmidecode-git-ae0e7bf6f0010f404610a590e3a091928dc6a20f.tar.gz |
Coding style fixes.
-rw-r--r-- | biosdecode.c | 10 | ||||
-rw-r--r-- | dmidecode.c | 10 | ||||
-rw-r--r-- | ownership.c | 2 | ||||
-rw-r--r-- | vpddecode.c | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/biosdecode.c b/biosdecode.c index 602d0a7..6ebb833 100644 --- a/biosdecode.c +++ b/biosdecode.c @@ -176,7 +176,7 @@ static size_t pnp_length(const u8 *p) static const char *pnp_event_notification(u8 code) { - static const char *notification[]={ + static const char *notification[] = { "Not Supported", /* 0x0 */ "Polling", "Asynchronous", @@ -192,10 +192,10 @@ static int pnp_decode(const u8 *p, size_t len) return 0; printf("PNP BIOS %u.%u present.\n", - p[0x04]>>4, p[0x04] & 0x0F); + p[0x04] >> 4, p[0x04] & 0x0F); printf("\tEvent Notification: %s\n", pnp_event_notification(WORD(p + 0x06) & 0x03)); - if ((WORD(p+0x06)&0x03)==0x01) + if ((WORD(p + 0x06) & 0x03) == 0x01) printf("\tEvent Notification Flag Address: 0x%08X\n", DWORD(p + 0x09)); printf("\tReal Mode 16-bit Code Address: %04X:%04X\n", @@ -206,7 +206,7 @@ static int pnp_decode(const u8 *p, size_t len) DWORD(p + 0x13) + WORD(p + 0x11)); printf("\t16-bit Protected Mode Data Address: 0x%08X\n", DWORD(p + 0x1D)); - if (DWORD(p + 0x17)!=0) + if (DWORD(p + 0x17) != 0) printf("\tOEM Device Identifier: %c%c%c%02X%02X\n", 0x40 + ((p[0x17] >> 2) & 0x1F), 0x40 + ((p[0x17] & 0x03) << 3) + ((p[0x18] >> 5) & 0x07), @@ -512,7 +512,7 @@ static int fjkeyinf_decode(const u8 *p, size_t len) for (i = 0; i < 6; i++) { - if (*(p + 8 + i * 4)==0) + if (*(p + 8 + i * 4) == 0) return 1; printf("\tDevice %d: type %u, chip %u", i + 1, *(p + 8 + i * 4), *(p + 8 + i * 4 + 2)); diff --git a/dmidecode.c b/dmidecode.c index 4e326c7..83e14ab 100644 --- a/dmidecode.c +++ b/dmidecode.c @@ -1716,7 +1716,7 @@ static void dmi_system_configuration_options(const struct dmi_header *h, const c static void dmi_bios_languages(const struct dmi_header *h, const char *prefix) { u8 *p = h->data + 4; - u8 count=p[0x00]; + u8 count = p[0x00]; int i; for (i = 1; i <= count; i++) @@ -4107,8 +4107,8 @@ static int address_from_efi(size_t *address) * Linux up to 2.6.6: /proc/efi/systab * Linux 2.6.7 and up: /sys/firmware/efi/systab */ - if ((efi_systab = fopen(filename="/sys/firmware/efi/systab", "r")) == NULL - && (efi_systab = fopen(filename="/proc/efi/systab", "r")) == NULL) + if ((efi_systab = fopen(filename = "/sys/firmware/efi/systab", "r")) == NULL + && (efi_systab = fopen(filename = "/proc/efi/systab", "r")) == NULL) { /* No EFI interface, fallback to memory scan */ return EFI_NOT_FOUND; @@ -4201,13 +4201,13 @@ int main(int argc, char * const argv[]) } /* First try EFI (ia64, Intel-based Mac) */ - efi=address_from_efi(&fp); + efi = address_from_efi(&fp); switch (efi) { case EFI_NOT_FOUND: goto memory_scan; case EFI_NO_SMBIOS: - ret=1; + ret = 1; goto exit_free; } diff --git a/ownership.c b/ownership.c index 901cbf4..d79af12 100644 --- a/ownership.c +++ b/ownership.c @@ -115,7 +115,7 @@ static int parse_command_line(int argc, char * const argv[]) { int option; const char *optstring = "d:hV"; - struct option longopts[]={ + struct option longopts[] = { { "dev-mem", required_argument, NULL, 'd' }, { "help", no_argument, NULL, 'h' }, { "version", no_argument, NULL, 'V' }, diff --git a/vpddecode.c b/vpddecode.c index f860575..2b0d27c 100644 --- a/vpddecode.c +++ b/vpddecode.c @@ -135,7 +135,7 @@ static int decode(const u8 *p) int main(int argc, char * const argv[]) { u8 *buf; - int found=0; + int found = 0; unsigned int fp; if (sizeof(u8) != 1) |