diff options
author | Mike Yuan <me@yhndnzj.com> | 2023-12-25 10:34:57 +0100 |
---|---|---|
committer | Mike Yuan <me@yhndnzj.com> | 2023-12-25 10:47:18 +0100 |
commit | 2413a0fab4fdad7eef3ce1d4b57664be5795b002 (patch) | |
tree | e7a21c95fa93122312f4243b211e668ca11a2cdf /coccinelle | |
parent | siphash24: introduce siphash24_compress_typesafe() macro (diff) | |
download | systemd-2413a0fab4fdad7eef3ce1d4b57664be5795b002.tar.xz systemd-2413a0fab4fdad7eef3ce1d4b57664be5795b002.zip |
format-table: introduce table_isempty and use it where appropriate
Diffstat (limited to 'coccinelle')
-rw-r--r-- | coccinelle/isempty.cocci | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/coccinelle/isempty.cocci b/coccinelle/isempty.cocci index cd912ff18f..2089970886 100644 --- a/coccinelle/isempty.cocci +++ b/coccinelle/isempty.cocci @@ -132,3 +132,13 @@ expression s; - prioq_size(s) != 0 + !prioq_isempty(s) ) +@@ +expression s; +@@ +( +- table_get_rows(s) <= 1 ++ table_isempty(s) +| +- table_get_rows(s) > 1 ++ !table_isempty(s) +) |