syntax-check: forbid usage of snprintf

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Pavel Hrdina 2019-11-13 17:33:27 +01:00 committed by Peter Krempa
parent 3c5dcf3427
commit 722f55180f

View File

@ -482,6 +482,11 @@ sc_prohibit_sprintf:
halt='use g_snprintf, not sprintf' \
$(_sc_search_regexp)
sc_prohibit_snprintf:
@prohibit='\<snprintf\>' \
halt='use g_snprintf, not snprintf' \
$(_sc_search_regexp)
sc_prohibit_readlink:
@prohibit='\<readlink *\(' \
halt='use virFileResolveLink, not readlink' \
@ -2277,6 +2282,9 @@ exclude_file_name_regexp--sc_prohibit_setuid = ^src/util/virutil\.c|tools/virt-l
exclude_file_name_regexp--sc_prohibit_sprintf = \
^(build-aux/syntax-check\.mk|docs/hacking\.html\.in|.*\.stp|.*\.pl)$$
exclude_file_name_regexp--sc_prohibit_snprintf = \
^(build-aux/syntax-check\.mk|docs/hacking\.html\.in|tools/virt-login-shell\.c)$$
exclude_file_name_regexp--sc_prohibit_strncpy = ^src/util/virstring\.c$$
exclude_file_name_regexp--sc_prohibit_strtol = ^examples/.*$$