[PATCH 3/4] syntax-check: forbid usage of setenv and unsetenv

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 build-aux/syntax-check.mk | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk
index 1c46928ac7..710ac1c949 100644
--- a/build-aux/syntax-check.mk
+++ b/build-aux/syntax-check.mk
@@ -1169,6 +1169,14 @@ sc_prohibit_dirent_d_type:
 	halt='do not use the d_type field in "struct dirent"' \
 	  $(_sc_search_regexp)
 
+sc_prohibit_setenv:
+	@prohibit='\<setenv\>' \
+	halt='use g_setenv instead of setenv' \
+	  $(_sc_search_regexp)
+	@prohibit='\<unsetenv\>' \
+	halt='use g_unsetenv instead of unsetenv' \
+	  $(_sc_search_regexp)
+
 
 # _sc_search_regexp
 #
@@ -2341,6 +2349,9 @@ exclude_file_name_regexp--sc_prohibit_cross_inclusion = \
 exclude_file_name_regexp--sc_prohibit_dirent_d_type = \
   ^(src/util/vircgroup.c)$
 
+exclude_file_name_regexp--sc_prohibit_setenv = \
+  ^(build-aux/syntax-check\.mk|bootstrap\.conf)$$
+
 exclude_file_name_regexp--sc_prohibit_strcmp = \
   ^(tools/nss/libvirt_nss.*\.c|tools/virt-login-shell\.c)
 
-- 
2.23.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux