]> git.ipfire.org Git - thirdparty/hostap.git/commit
trace: Define TEST_FAIL and TEST_FAIL_TAG as inline function
authorBenjamin Berg <benjamin.berg@intel.com>
Tue, 14 Oct 2025 08:09:43 +0000 (10:09 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 17 Oct 2025 14:06:16 +0000 (17:06 +0300)
commit126f243eb767fb529466b4077479b6d4d7425bf3
tree7b2195e9e00099bad439ee4c37f68f881ad1a915
parent15edb9b3db02511368c3ae526b1dc8fcdc6931ee
trace: Define TEST_FAIL and TEST_FAIL_TAG as inline function

While these macros are usually used in conditions, they can also simply
be used as a statement in order to check whether a certain code path was
taken. In that case, using a macro that turns into a constant 0 may
cause a compiler warning.

Avoid that issue by using a static inline function that returns 0. This
fixes a build regression introduced by f5790e97cd64 ("nl80211: Delay
event processing during command handling").

Fixes: f5790e97cd64 ("nl80211: Delay event processing during command handling")
Reported-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
src/utils/os.h