The marginally nicer error message is not worth the extra lines in
cfg.mk.
Also drop the excludes since there was only one offender in the tests.
---
cfg.mk | 15 ++-------------
tests/virstoragetest.c | 2 +-
2 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index 3405c9a..42123c3 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -980,13 +980,8 @@ sc_prohibit_pthread_create:
$(_sc_search_regexp)
sc_prohibit_not_streq:
- @prohibit='! *STREQ *\(.*\)' \
- halt='Use STRNEQ instead of !STREQ' \
- $(_sc_search_regexp)
-
-sc_prohibit_not_strneq:
- @prohibit='! *STRNEQ *\(.*\)' \
- halt='Use STREQ instead of !STRNEQ' \
+ @prohibit='! *STRN?EQ *\(.*\)' \
+ halt='Use STRNEQ instead of !STREQ and STREQ instead of !STRNEQ' \
$(_sc_search_regexp)
sc_prohibit_verbose_strcat:
@@ -1240,12 +1235,6 @@ 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]$$
-
exclude_file_name_regexp--sc_prohibit_dt_without_code = \
^docs/(newapi\.xsl|(apps|contact)\.html\.in)$$
diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index 3b19f59..184b936 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -698,7 +698,7 @@ testBackingParse(const void *args)
goto cleanup;
}
- if (!STREQ(xml, data->expect)) {
+ if (STRNEQ(xml, data->expect)) {
fprintf(stderr, "\n backing store string '%s'\n"
"expected storage source xml:\n%s\n"
"actual storage source xml:\n%s\n",
--
2.7.3