]> xenbits.xensource.com Git - libvirt.git/commitdiff
syntax-check: prefer g_mkstemp_full and g_mkdtemp
authorJán Tomko <jtomko@redhat.com>
Thu, 14 Nov 2019 13:44:24 +0000 (14:44 +0100)
committerJán Tomko <jtomko@redhat.com>
Thu, 14 Nov 2019 18:02:31 +0000 (19:02 +0100)
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
build-aux/syntax-check.mk

index 74d0d5f6d48221a05a4b8257b014ddaf99754013..7d1ac4dbfc1fc2b5b30d0d89d38120f745e889d8 100644 (file)
@@ -402,10 +402,17 @@ sc_prohibit_fork_wrappers:
        halt='use virCommand for child processes' \
          $(_sc_search_regexp)
 
-# Prefer mkostemp with O_CLOEXEC.
+# Prefer g_mkostemp_full with O_CLOEXEC.
 sc_prohibit_mkstemp:
-       @prohibit='[^"]\<mkstemps? *\(' \
-       halt='use mkostemp with O_CLOEXEC instead of mkstemp' \
+       @prohibit='[^"]\<mko?stemps? *\(' \
+       in_vc_files='\.[chx]$$' \
+       halt='use g_mkstemp_full with O_CLOEXEC instead of mkstemp' \
+         $(_sc_search_regexp)
+
+sc_prohibit_mkdtemp:
+       @prohibit='[^"]\<mkdtemp *\(' \
+       in_vc_files='\.[chx]$$' \
+       halt='use g_mkdtemp instead of mkdtemp' \
          $(_sc_search_regexp)
 
 # access with X_OK accepts directories, but we can't exec() those.