[libvirt] [PATCH 2/2] Prefer STREQ and STRNEQ

Ishmanpreet Khera khera.ishman at gmail.com
Tue Oct 20 10:37:13 UTC 2015


Ping?

On Wed, Oct 7, 2015 at 11:02 PM, Ishmanpreet Khera <khera.ishman at gmail.com>
wrote:

> new syntax-check rule for !STREQ and !STRNEQ so that
> we don't end up in the same situation again.
>
> Signed-off-by: Ishmanpreet Kaur Khera <khera.ishman at gmail.com>
> ---
>  cfg.mk | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/cfg.mk b/cfg.mk
> index e436434..7343dfc 100644
> --- a/cfg.mk
> +++ b/cfg.mk
> @@ -1011,6 +1011,18 @@ sc_prohibit_pthread_create:
>      halt="avoid using 'pthread_create', use 'virThreadCreate' instead" \
>        $(_sc_search_regexp)
>
> +sc_prohibit_not_streq:
> +       @prohibit='!STREQ'                \
> +       exclude='exempt from syntax-check'        \
> +       halt='Use STRNEQ instead of !STREQ'        \
> +         $(_sc_search_regexp)
> +
> +sc_prohibit_not_strneq:
> +       @prohibit='!STRNEQ'                \
> +       exclude='exempt from syntax-check'        \
> +       halt='Use STREQ instead of !STRNEQ'        \
> +         $(_sc_search_regexp)
> +
>  # We don't use this feature of maint.mk.
>  prev_version_file = /dev/null
>
> @@ -1213,3 +1225,9 @@
> exclude_file_name_regexp--sc_prohibit_sysconf_pagesize = \
>
>  exclude_file_name_regexp--sc_prohibit_pthread_create = \
>    ^(cfg\.mk|src/util/virthread\.c|tests/.*)$$
> +
> +exclude_file_name_regexp--sc_prohibit_not_streq = \
> +  ^tests/.*\.[ch]$$
> +
> +exclude_file_name_regexp--sc_prohibit_not_strneq = \
> +  ^tests/.*\.[ch]$$
> --
> 1.9.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20151020/7e6f1a1a/attachment-0001.htm>


More information about the libvir-list mailing list