Re: [PATCH 06/10] maint: tighten strncmp syntax check

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

 



On Wed, Nov 17, 2010 at 09:28:58PM -0700, Eric Blake wrote:
> Using 'int ret = strcmp(a, b)' in a qsort function is a valid use of
> str[n]cmp that should _not_ be turned to STREQ, but it was falling
> foul of our specific syntax-check.  Meanwhile, gnulib's maint.mk
> already has a tighter bound for strcmp, so we can copy that regex and
> just check for strncmp, which results in fewer false positives that
> require exceptions.
> 
> * cfg.mk (sc_prohibit_strcmp_and_strncmp): Rename...
> (sc_prohibit_strncmp): ...to this, and tighten, to mirror
> maint.mk's sc_prohibit_strcmp's better regex.
> * Makefile.am (syntax_check_exceptions): Update exception rule.
> * .x-sc_prohibit_strcmp_and_strncmp: Rename...
> * .x-sc_prohibit_strncmp: ...and trim.
> ---
>  .x-sc_prohibit_strcmp_and_strncmp |    9 ---------
>  .x-sc_prohibit_strncmp            |    1 +
>  Makefile.am                       |    2 +-
>  cfg.mk                            |   14 ++++++++------
>  4 files changed, 10 insertions(+), 16 deletions(-)
>  delete mode 100644 .x-sc_prohibit_strcmp_and_strncmp
>  create mode 100644 .x-sc_prohibit_strncmp

ACK

Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]