Re: [PATCH v2 3/4] syntax-check: update of sprintf rule to mention g_snpritnf

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

 



On 11/13/19 10:33 AM, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---

new in v2

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

diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk
index 1c46928ac7..ff1198ca73 100644
--- a/build-aux/syntax-check.mk
+++ b/build-aux/syntax-check.mk
@@ -462,11 +462,11 @@ sc_prohibit_risky_id_promotion:
  	halt='cast -1 to ([ug]id_t) before comparing against id' \
  	  $(_sc_search_regexp)
-# Use snprintf rather than s'printf, even if buffer is provably large enough,
+# Use g_snprintf rather than s'printf, even if buffer is provably large enough,
  # since gnulib has more guarantees for snprintf portability
  sc_prohibit_sprintf:
  	@prohibit='\<[s]printf\>' \

Should we be modifying @prohibit= to also prohibit bare snprintf?

-	halt='use snprintf, not sprintf' \
+	halt='use g_snprintf, not sprintf' \
  	  $(_sc_search_regexp)
sc_prohibit_readlink:


--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

--
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