]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: Use file_id_str_buf() in file_id_string()
authorVolker Lendecke <vl@samba.org>
Tue, 3 Sep 2019 14:12:35 +0000 (16:12 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 10 Sep 2019 23:14:31 +0000 (23:14 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/file_id.c

index b2cf313b81f529db6055ced2d50fc54948b2be59..49e5c50385fefce6e16a462462090eadfe431dc5 100644 (file)
@@ -55,10 +55,8 @@ char *file_id_str_buf(struct file_id fid, struct file_id_buf *dst)
  */
 const char *file_id_string(TALLOC_CTX *mem_ctx, const struct file_id *id)
 {
-       char *result = talloc_asprintf(mem_ctx, "%llx:%llx:%llx",
-                                      (unsigned long long)id->devid,
-                                      (unsigned long long)id->inode,
-                                      (unsigned long long)id->extid);
+       struct file_id_buf buf;
+       char *result = talloc_strdup(mem_ctx, file_id_str_buf(*id, &buf));
        SMB_ASSERT(result != NULL);
        return result;
 }