From: Björn Jacke Date: Sun, 25 Aug 2019 21:01:22 +0000 (+0200) Subject: samba_autoconf.py: avoid inefficient string concatenations X-Git-Tag: talloc-2.3.1~745 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0141c82eedbe525169546f6d30488149c3a7ed7a;p=thirdparty%2Fsamba.git samba_autoconf.py: avoid inefficient string concatenations Signed-off-by: Bjoern Jacke Reviewed-by: Andrew Bartlett --- diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index ee15e34b5ec..63664a41160 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -23,13 +23,12 @@ def DEFINE(conf, d, v, add_to_cflags=False, quote=False): def hlist_to_string(conf, headers=None): '''convert a headers list to a set of #include lines''' - hdrs='' hlist = conf.env.hlist if headers: hlist = hlist[:] hlist.extend(TO_LIST(headers)) - for h in hlist: - hdrs += '#include <%s>\n' % h + hdrs = "\n".join('#include <%s>' % h for h in hlist) + return hdrs