]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
cfg.mk: allow integers to be assigned a value computed with i|j|k
authorMartin Kletzander <mkletzan@redhat.com>
Wed, 16 Jul 2014 05:56:50 +0000 (07:56 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Fri, 22 Aug 2014 07:12:14 +0000 (09:12 +0200)
Even line like this:

int asdf = i - somevar;

was matched by the regex, so this patch adds '=' to the list of
characters that break the regexp.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
cfg.mk

diff --git a/cfg.mk b/cfg.mk
index bf5cb7df46d0a03be295ae763f3cb44084b02a4a..307009e54b52dc5e3f3be2b78aa1dde8b8686d72 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -568,7 +568,7 @@ sc_avoid_attribute_unused_in_header:
          $(_sc_search_regexp)
 
 sc_prohibit_int_ijk:
-       @prohibit='\<(int|unsigned) ([^(]* )*(i|j|k)\>(\s|,|;)'         \
+       @prohibit='\<(int|unsigned) ([^(=]* )*(i|j|k)\>(\s|,|;)'        \
        halt='use size_t, not int/unsigned int for loop vars i, j, k'   \
          $(_sc_search_regexp)