From 4ee8b2937d48308c6089fb539fdbd8625dfde360 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 10 Sep 2007 10:56:07 +0000 Subject: r25055: Add file_id_string_tos This removes file_id_string_static and file_id_string_static2 (This used to be commit 638c848c9afe374feb30e34c494f89b2a6c64f7b) --- source3/lib/file_id.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'source3/lib/file_id.c') diff --git a/source3/lib/file_id.c b/source3/lib/file_id.c index a92cca08fa..0a1913a9c2 100644 --- a/source3/lib/file_id.c +++ b/source3/lib/file_id.c @@ -55,25 +55,11 @@ BOOL file_id_equal(const struct file_id *id1, const struct file_id *id2) /* a static string for a file_id structure */ -const char *file_id_static_string(const struct file_id *id) +const char *file_id_string_tos(const struct file_id *id) { - static char buf[32]; - snprintf(buf, sizeof(buf), "%llx:%llx", - (unsigned long long)id->devid, - (unsigned long long)id->inode); - return buf; -} - -/* - a 2nd static string for a file_id structure so we can print 2 at once - */ -const char *file_id_static_string2(const struct file_id *id) -{ - static char buf[32]; - snprintf(buf, sizeof(buf), "%llx:%llx", - (unsigned long long)id->devid, - (unsigned long long)id->inode); - return buf; + return talloc_asprintf(talloc_tos(), "%llx:%llx", + (unsigned long long)id->devid, + (unsigned long long)id->inode); } /* -- cgit