[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v4 13/13] Introduce syntax-check rule to prefer VIR_STRDUP over strdup



On 20.05.2013 19:55, Michal Privoznik wrote:
> ---
>  cfg.mk | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/cfg.mk b/cfg.mk
> index bb93c6a..c714915 100644
> --- a/cfg.mk
> +++ b/cfg.mk
> @@ -387,6 +387,11 @@ sc_prohibit_asprintf:
>  	halt='use strdup instead of virAsprintf with "%s"'		\
>  	  $(_sc_search_regexp)
>  
> +sc_prohibit_strdup:
> +	@prohibit='\<strn?dup\> *\('					\
> +	halt='use VIR_STRDUP, not strdup'				\
> +	  $(_sc_search_regexp)
> +
>  # Prefer virSetUIDGID.
>  sc_prohibit_setuid:
>  	@prohibit='\<set(re)?[ug]id\> *\('				\
> @@ -874,6 +879,9 @@ exclude_file_name_regexp--sc_prohibit_always_true_header_tests = \
>  exclude_file_name_regexp--sc_prohibit_asprintf = \
>    ^(bootstrap.conf$$|src/util/virstring\.c$$|examples/domain-events/events-c/event-test\.c$$|tests/vircgroupmock\.c$$)
>  
> +exclude_file_name_regexp--sc_prohibit_strdup = \
> +  ^(docs/|examples/|python/|src/util/virstring\.c$$|tools/virsh\.c$$)
> +

If 14/13 is accepted, then this line needs to be:

^(docs/|examples/|python/|src/util/virstring\.c$$)

>  exclude_file_name_regexp--sc_prohibit_close = \
>    (\.p[yl]$$|^docs/|^(src/util/virfile\.c|src/libvirt\.c|tests/vircgroupmock\.c)$$)
>  
> 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]