From: Pavel Hrdina <phrdina@xxxxxxxxxx> Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- build-aux/syntax-check.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 6b62e20ed4..f1e976ec76 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -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/.*$$ -- 2.23.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list