From: Volker Lendecke Date: Wed, 4 Dec 2024 18:37:20 +0000 (+0100) Subject: lib: Simplify ad_get_internal() X-Git-Tag: tdb-1.4.13~299 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e166299b186e11376b7cfdb902805e013fc0f598;p=thirdparty%2Fsamba.git lib: Simplify ad_get_internal() We have metadata_fsp() for this Signed-off-by: Volker Lendecke Reviewed-by: Pavel Filipenský --- diff --git a/source3/lib/adouble.c b/source3/lib/adouble.c index 264e8f69013..71efa4a6a9f 100644 --- a/source3/lib/adouble.c +++ b/source3/lib/adouble.c @@ -2584,11 +2584,8 @@ static struct adouble *ad_get_internal(TALLOC_CTX *ctx, int mode; if (fsp != NULL) { - if (fsp_is_alternate_stream(fsp)) { - smb_fname = fsp->base_fsp->fsp_name; - } else { - smb_fname = fsp->fsp_name; - } + struct files_struct *meta_fsp = metadata_fsp(fsp); + smb_fname = meta_fsp->fsp_name; } DEBUG(10, ("ad_get(%s) called for %s\n",