]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbstatus: Use share_mode_filename()
authorVolker Lendecke <vl@samba.org>
Wed, 4 Nov 2020 12:20:09 +0000 (13:20 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 10 Nov 2020 19:49:34 +0000 (19:49 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/utils/status.c

index 46fd457c8c8e06af82dc8aff181e53d2f8d420c9..59f09b771601e983178bca0523d8110f20662f6f 100644 (file)
@@ -261,14 +261,7 @@ static void print_brl(struct file_id id,
 
        share_mode = fetch_share_mode_unlocked(NULL, id);
        if (share_mode) {
-               bool has_stream = share_mode->data->stream_name != NULL;
-
-               fname = talloc_asprintf(NULL, "%s%s%s",
-                                       share_mode->data->base_name,
-                                       has_stream ? ":" : "",
-                                       has_stream ?
-                                       share_mode->data->stream_name :
-                                       "");
+               fname = share_mode_filename(NULL, share_mode);
        } else {
                fname = talloc_strdup(NULL, "");
                if (fname == NULL) {