mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-29 08:29:03 +03:00
util/nvmutil: don't use xor swap
it doesn't save any time on modern systems, and it's just confusing for some people to read. i mean, i understand it instinctively, but normal people do it with a swap variable. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -464,9 +464,9 @@ swap(int partnum)
|
||||
|
||||
for (size_t w = NVM_SIZE * ((uint8_t *) &e)[0], x = 1;
|
||||
w < NVM_SIZE; w += 2, x += 2) {
|
||||
uint8_t chg = n[w];
|
||||
n[w] ^= n[x];
|
||||
n[x] ^= n[w];
|
||||
n[w] ^= n[x];
|
||||
n[x] ^= chg;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user