]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[efi] Fix operator precedence in autoexec network download 1694/head
authorHuzaifa Ali Zar <zar@amazon.com>
Tue, 28 Apr 2026 21:52:13 +0000 (21:52 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 29 Apr 2026 10:25:59 +0000 (11:25 +0100)
commitdf4eec8cfb4fda2b4bc1ce87fd101b80205c1e92
tree1a4be183a74818b9b93526ed799c2b5886a2c06d
parent8d2ebbf8a10331a3b13ab32fcc321e835751c96a
[efi] Fix operator precedence in autoexec network download

The != operator has higher precedence than = in C, so the expressions:

  rc = imgacquire ( ..., image ) != 0

are parsed as:

  rc = ( imgacquire ( ..., image ) != 0 )

This assigns the boolean result (0 or 1) to rc instead of the actual
return code from imgacquire().  As a result, strerror(rc) reports an
incorrect error message when debugging is enabled.

Add parentheses around each assignment to ensure rc captures the
actual return value, matching the pattern already used in
efi_autoexec_filesystem() within the same file.

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/interface/efi/efi_autoexec.c