diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-09-10 10:56:07 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:30:36 -0500 |
commit | 4ee8b2937d48308c6089fb539fdbd8625dfde360 (patch) | |
tree | 738ce5408f32af68a66d8545257e7d226c2a7586 /source3/lib | |
parent | 3428c63aa74f46c3db65736bf1c56502fad2362c (diff) | |
download | samba-4ee8b2937d48308c6089fb539fdbd8625dfde360.tar.gz samba-4ee8b2937d48308c6089fb539fdbd8625dfde360.tar.bz2 samba-4ee8b2937d48308c6089fb539fdbd8625dfde360.zip |
r25055: Add file_id_string_tos
This removes file_id_string_static and file_id_string_static2
(This used to be commit 638c848c9afe374feb30e34c494f89b2a6c64f7b)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/file_id.c | 22 |
1 files changed, 4 insertions, 18 deletions
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); } /* |