util/nvmutil: use correct comparisons on pointers

Signed-off-by: Leah Rowe <leah@libreboot.org>
btrfsvols
Leah Rowe 2023-09-19 16:00:57 +01:00
parent 137a548b04
commit 5e8013601a
1 changed files with 3 additions and 3 deletions

View File

@ -103,7 +103,7 @@ main(int argc, char *argv[])
if ((gbeFileModified) && (flags != O_RDONLY) && (cmd != writeGbeFile)) if ((gbeFileModified) && (flags != O_RDONLY) && (cmd != writeGbeFile))
writeGbeFile(); writeGbeFile();
err_if((errno != 0) && (cmd != &cmd_dump)); err_if((errno != 0) && (cmd != cmd_dump));
return errno; return errno;
} }
@ -122,8 +122,8 @@ void
readGbeFile(void) readGbeFile(void)
{ {
nf = ((cmd == writeGbeFile) || (cmd == cmd_copy)) ? SIZE_4KB : nf; nf = ((cmd == writeGbeFile) || (cmd == cmd_copy)) ? SIZE_4KB : nf;
skipread[part ^ 1] = (cmd == &cmd_copy) | (cmd == &cmd_setchecksum) skipread[part ^ 1] = (cmd == cmd_copy) | (cmd == cmd_setchecksum)
| (cmd == &cmd_brick); | (cmd == cmd_brick);
gbe[1] = (gbe[0] = (size_t) buf) + SIZE_4KB; gbe[1] = (gbe[0] = (size_t) buf) + SIZE_4KB;
for (int p = 0; p < 2; p++) { for (int p = 0; p < 2; p++) {
if (skipread[p]) if (skipread[p])