Patch review -- file_id_string_tos()?

Volker Lendecke Volker.Lendecke at SerNet.DE
Mon Oct 29 09:47:31 MDT 2012


Hi, Andrew!

The attached patch removes some code duplication. I send
this to you because you introduced file_id_string() without
_tos() recently.

Please review and push if it seems appropriate to you.

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 4ce28482ac2673539362bbbf10a57d8f1730203d Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Mon, 29 Oct 2012 16:41:15 +0100
Subject: [PATCH] s3: Use file_id_string in file_id_string_tos

---
 source3/lib/file_id.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/source3/lib/file_id.c b/source3/lib/file_id.c
index 360b355..ba4b3a3 100644
--- a/source3/lib/file_id.c
+++ b/source3/lib/file_id.c
@@ -36,12 +36,7 @@ bool file_id_equal(const struct file_id *id1, const struct file_id *id2)
  */
 const char *file_id_string_tos(const struct file_id *id)
 {
-	char *result = talloc_asprintf(talloc_tos(), "%llx:%llx:%llx",
-				       (unsigned long long)id->devid,
-				       (unsigned long long)id->inode,
-				       (unsigned long long)id->extid);
-	SMB_ASSERT(result != NULL);
-	return result;
+	return file_id_string(talloc_tos(), id);
 }
 
 /*
-- 
1.7.9.5



More information about the samba-technical mailing list