From: Volker Lendecke Date: Wed, 15 Jul 2026 10:10:42 +0000 (+0200) Subject: smbd: Simplify full_path_extend() X-Git-Tag: tevent-0.17.2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0cd03e15e02a0f53de9eb5a471ace12ddbb721f6;p=thirdparty%2Fsamba.git smbd: Simplify full_path_extend() Use talloc_asprintf_addsep() Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher --- diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 1df5a5846c4..d626ac5f32e 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -926,10 +926,7 @@ fail: static bool full_path_extend(char **dir, const char *atname) { - talloc_asprintf_addbuf(dir, - "%s%s", - (*dir)[0] == '\0' ? "" : "/", - atname); + talloc_asprintf_addsep(dir, "/", "%s", atname); return (*dir) != NULL; }