summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-10-06 17:41:02 +0200
committerThomas Haller <thaller@redhat.com>2022-10-06 17:41:13 +0200
commitf28811d068c427ee46dec5fa1a3df773a0490b92 (patch)
tree9f628f08608a54c35b5a61ae399f660f647a2408
parent4eb80c8a5abe14038d4bb17455525af5d65505e0 (diff)
checkpatch: discourage GSlice APIth/gslice
-rwxr-xr-xcontrib/scripts/checkpatch.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/scripts/checkpatch.pl b/contrib/scripts/checkpatch.pl
index 045d786c3a..fcd0b6977a 100755
--- a/contrib/scripts/checkpatch.pl
+++ b/contrib/scripts/checkpatch.pl
@@ -206,6 +206,7 @@ complain ("Define setting properties with _nm_setting_property_define_direct_*()
complain ("Use nm_g_array_{index,first,last,index_p}() instead of g_array_index(), as it nm_assert()s for valid element size and out-of-bound access") if $line =~ /\bg_array_index\b/;
complain ("Use spaces instead of tabs") if $line =~ /\t/;
complain ("Prefer implementing private pointers via _NM_GET_PRIVATE() or _NM_GET_PRIVATE_PTR() (the latter, if the private data has an opqaue pointer in the header file)") if $line =~ /\b(g_type_class_add_private|G_TYPE_INSTANCE_GET_PRIVATE)\b/;
+complain ("Avoid GSlice API, instead of g_malloc() or nm_slice*().") if $line =~ /\bg_slice_/;
# Further on we process stuff without comments.
$_ = $line;