HomeFreeBSD

linuxulator: Fix operator precedence for LINUX_XATTR_FLAGS in setxattr()

Description

linuxulator: Fix operator precedence for LINUX_XATTR_FLAGS in setxattr()

The LINUX_XATTR_FLAGS macro expands to (LINUX_XATTR_CREATE|LINUX_XATTR_REPLACE).
Without parentheses around the macro expansion, the bitwise & operator has
higher precedence than |, causing incorrect flag evaluation and a compiler
warning.

Add the missing parentheses around LINUX_XATTR_FLAGS to ensure correct
operator grouping, matching the existing usage in getxattr().

Signed-off-by: YAO, Xin <mr.yaoxin@outlook.com>
Fixes: 2c905456312b ("linuxulator: Fix O_PATH file descriptors errno for f*xattr(2)")
Reviewed by: kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/2306

Details

Provenance
mr.yaoxin_outlook.comAuthored on Jul 1 2026, 8:10 PM
pouriaCommitted on Jul 2 2026, 11:17 AM
Parents
rGfbc039e512c3: tests: fix checksum computation
Branches
Unknown
Tags
Unknown