]> www.infradead.org Git - users/mchehab/rasdaemon.git/commit
rbtree.h: Fix an issue introduced by checkpatch logic
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 16 Jul 2024 08:12:42 +0000 (10:12 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 16 Jul 2024 08:12:42 +0000 (10:12 +0200)
commit69db9e831dbf5a44cba9c329089e8a8de8e39bd6
treee19fa03ce639d52ead14b0d4a1f1aa6a7ba99ff2
parent7346f2d0681ea75eea9784bae8e687c0c65fc3c0
rbtree.h: Fix an issue introduced by checkpatch logic

Checkpatch actually broke RB_EMPTY_ROOT macro. It was defined
as:

#define RB_EMPTY_ROOT(root)    ((root)->rb_node == NULL)

It ended replacing it by:
((root)->!rb_node)

Which is not the way we espect it. Weird enough, this was compiling.
Anyway, what we want, instead, is:

#define RB_EMPTY_ROOT(root)    (!(root)->rb_node)

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
rbtree.h