checkpatch: suggest nm_memdup() instead of g_memdup()
This commit is contained in:
@@ -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 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 ("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 ("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 ("Use nm_memdup() instead of g_memdup(). The latter has a size argument of type guint") if $line =~ /\bg_memdup\b/;
|
||||||
|
|
||||||
# Further on we process stuff without comments.
|
# Further on we process stuff without comments.
|
||||||
$_ = $line;
|
$_ = $line;
|
||||||
|
Reference in New Issue
Block a user