From 0141c82eedbe525169546f6d30488149c3a7ed7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= Date: Sun, 25 Aug 2019 23:01:22 +0200 Subject: [PATCH] samba_autoconf.py: avoid inefficient string concatenations Signed-off-by: Bjoern Jacke Reviewed-by: Andrew Bartlett --- buildtools/wafsamba/samba_autoconf.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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