]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - coccinelle/isempty.cocci
format-table: introduce table_isempty and use it where appropriate
[thirdparty/systemd.git] / coccinelle / isempty.cocci
index cd912ff18f422151ad244aeebe8418fd0959ff28..20899708864997393998e26ee2f354c2a7cda95f 100644 (file)
@@ -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)
+)