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

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

 



On 11/18/2010 02:51 AM, Daniel P. Berrange wrote:
> 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

1-6 are now pushed after fixing some typos I noticed in the comments of
1 and 2; I'll respond to your comments on 7-8 and rebase 9-10 for
another round of review before pushing those.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]