]> xenbits.xensource.com Git - libvirt.git/commitdiff
logging.c: Properly indent and ignore one syntax-check rule
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 2 Nov 2012 10:07:54 +0000 (11:07 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 2 Nov 2012 10:19:04 +0000 (11:19 +0100)
With our fix of mkostemp (pushed as 2b435c15) we define a macro
to compile with uclibc. However, this definition is conditional
and thus needs to be properly indented. Moreover, with this definition
sc_prohibit_mkstemp syntax-check rule keeps yelling:

  src/util/logging.c:63:# define mkostemp(x,y) mkstemp(x)
  maint.mk: use mkostemp with O_CLOEXEC instead of mkstemp

Therefore we should ignore this file for this rule.

cfg.mk
src/util/logging.c

diff --git a/cfg.mk b/cfg.mk
index cda04e418aee5591e62ec7a287ea0b6aa40e1afc..963f642f1891e331e5618bb483967d0c85b008bd 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -817,3 +817,5 @@ exclude_file_name_regexp--sc_unmarked_diagnostics = \
   ^(docs/apibuild.py|tests/virt-aa-helper-test)$$
 
 exclude_file_name_regexp--sc_size_of_brackets = cfg.mk
+
+exclude_file_name_regexp--sc_prohibit_mkstemp = ^src/util/logging\.c$$
index c0b2f0b65be3f8093b463adc1c3bf8a740e04cdc..27bd74c7b8e803bf3f743452d49629619114414b 100644 (file)
@@ -60,7 +60,7 @@
 
 #ifdef __UCLIBC__
 /* uclibc does not implement mkostemp GNU extention */
-#define mkostemp(x,y) mkstemp(x)
+# define mkostemp(x,y) mkstemp(x)
 #endif
 
 VIR_ENUM_DECL(virLogSource)