summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-06-01 12:16:12 +0100
committerLeah Rowe <leah@libreboot.org>2023-06-01 12:18:48 +0100
commit9aa34f1e20263c8b25d4865f3b68db2e985ce5d8 (patch)
tree827f5810d0fd9bb8a13da22bb93412be4bf3a1e5
parent18f39ab6fafde132af48350d7c976afa5716038f (diff)
util/nvmutil: use bsd-style indentation
the style was already quite similar, but extended lines in bsd are indented by 4 spaces instead of a tab. this style has grown on me, so i'm adopting it here Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--util/nvmutil/nvmutil.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index fcdab9e8..3a050644 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -40,9 +40,10 @@ main(int argc, char *argv[])
err_if((errno = ((strMac == NULL) && (cmd == NULL)) ? EINVAL : errno));
- skipread[part ^ 1] = (cmd == &cmd_copy) |
- (cmd == &cmd_setchecksum) | (cmd == &cmd_brick);
+ skipread[part ^ 1] = (cmd == &cmd_copy) | (cmd == &cmd_setchecksum)
+ | (cmd == &cmd_brick);
readGbeFile(FILENAME, flags);
+
(void)rhex();
xunveil("/dev/urandom", "r");
if (flags == O_RDONLY) {
@@ -114,7 +115,7 @@ invalidMacAddress(const char *strMac, uint16_t *mac)
if (strMac[i + nib] == '?')
h = (h & 0xE) | 2; /* local, unicast */
mac[byte >> 1] |= ((uint16_t ) h)
- << ((8 * (byte % 2)) + (4 * (nib ^ 1)));
+ << ((8 * (byte % 2)) + (4 * (nib ^ 1)));
}
}}
return ((total == 0) | (mac[0] & 1)); /* multicast/all-zero banned */
@@ -206,7 +207,7 @@ cmd_swap(void)
{
xorswap(gbe[0], gbe[1]); /* speedhack: swap ptr, not words */
gbeFileModified = nvmPartModified[0] = nvmPartModified[1]
- = validChecksum(1) | validChecksum(0);
+ = validChecksum(1) | validChecksum(0);
}
void