aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2010-11-17 16:41:31 -0700
committerEric Blake <eblake@redhat.com>2010-11-18 12:21:58 -0700
commitd2af8ffcd8b75dfb59bbe5cd214a0a082fee0465 (patch)
tree837adfe6365a7b857fde0e3857baf090dc626a9a /Makefile.am
parentvirExec: fix bug in setting up child stderr/out with /dev/null (diff)
downloadlibvirt-d2af8ffcd8b75dfb59bbe5cd214a0a082fee0465.tar.gz
libvirt-d2af8ffcd8b75dfb59bbe5cd214a0a082fee0465.tar.bz2
libvirt-d2af8ffcd8b75dfb59bbe5cd214a0a082fee0465.zip
maint: tighten strncmp syntax check
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.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index e88814467..d3f8876b2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,7 +35,7 @@ EXTRA_DIST = \
.x-sc_prohibit_nonreentrant \
.x-sc_prohibit_sprintf \
.x-sc_prohibit_strcmp \
- .x-sc_prohibit_strcmp_and_strncmp \
+ .x-sc_prohibit_strncmp \
.x-sc_prohibit_strncpy \
.x-sc_prohibit_test_minus_ao \
.x-sc_prohibit_VIR_ERR_NO_MEMORY \