You need to sign in or sign up before continuing.
提交 722f5518 编写于 作者: P Pavel Hrdina 提交者: Peter Krempa

syntax-check: forbid usage of snprintf

Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 3c5dcf34
...@@ -482,6 +482,11 @@ sc_prohibit_sprintf: ...@@ -482,6 +482,11 @@ sc_prohibit_sprintf:
halt='use g_snprintf, not sprintf' \ halt='use g_snprintf, not sprintf' \
$(_sc_search_regexp) $(_sc_search_regexp)
sc_prohibit_snprintf:
@prohibit='\<snprintf\>' \
halt='use g_snprintf, not snprintf' \
$(_sc_search_regexp)
sc_prohibit_readlink: sc_prohibit_readlink:
@prohibit='\<readlink *\(' \ @prohibit='\<readlink *\(' \
halt='use virFileResolveLink, not readlink' \ halt='use virFileResolveLink, not readlink' \
...@@ -2277,6 +2282,9 @@ exclude_file_name_regexp--sc_prohibit_setuid = ^src/util/virutil\.c|tools/virt-l ...@@ -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 = \ exclude_file_name_regexp--sc_prohibit_sprintf = \
^(build-aux/syntax-check\.mk|docs/hacking\.html\.in|.*\.stp|.*\.pl)$$ ^(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_strncpy = ^src/util/virstring\.c$$
exclude_file_name_regexp--sc_prohibit_strtol = ^examples/.*$$ exclude_file_name_regexp--sc_prohibit_strtol = ^examples/.*$$
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册