mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 10:52:22 +00:00
syntax-check: forbid virBufferAsprintf with string literals
This commit is contained in:
parent
dcea5a492f
commit
605a077244
5
cfg.mk
5
cfg.mk
@ -490,6 +490,11 @@ sc_prohibit_virBufferAdd_with_string_literal:
|
||||
halt='use virBufferAddLit, not virBufferAdd, with a string literal' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
sc_prohibit_virBufferAsprintf_with_string_literal:
|
||||
@prohibit='\<virBufferAsprintf *\([^,]+, *"([^%"\]|\\.|%%)*"\)' \
|
||||
halt='use virBufferAddLit, not virBufferAsprintf, with a string literal' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Not only do they fail to deal well with ipv6, but the gethostby*
|
||||
# functions are also not thread-safe.
|
||||
sc_prohibit_gethostby:
|
||||
|
Loading…
x
Reference in New Issue
Block a user