From: Volker Lendecke Date: Wed, 15 Jul 2026 10:22:24 +0000 (+0200) Subject: vfs_ceph_rgw: Simplify normalise_name() X-Git-Tag: tevent-0.17.2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b677ee3fa325ca0860410c725317ed50eba5494;p=thirdparty%2Fsamba.git vfs_ceph_rgw: Simplify normalise_name() Use talloc_asprintf_addsep() Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher --- diff --git a/source3/modules/vfs_ceph_rgw.c b/source3/modules/vfs_ceph_rgw.c index d8d75e1754d..8a7ca204100 100644 --- a/source3/modules/vfs_ceph_rgw.c +++ b/source3/modules/vfs_ceph_rgw.c @@ -155,10 +155,7 @@ static char *normalise_name(TALLOC_CTX *ctx, const char *pathname_in) if (strcmp(token, ".") == 0 || strcmp(token, "..") == 0) { continue; } - talloc_asprintf_addbuf(&result, - "%s%s", - *result ? "/" : "", - token); + talloc_asprintf_addsep(&result, "/", "%s", token); } TALLOC_FREE(copy);