diff options
Diffstat (limited to 'libglusterfs/src/xlator.c')
-rw-r--r-- | libglusterfs/src/xlator.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index d8997bc7d16..f9e5db67183 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -618,10 +618,12 @@ out: return ret; } -char* -loc_gfid_utoa (loc_t *loc) +void +loc_gfid (loc_t *loc, uuid_t gfid) { - uuid_t gfid={0}; + if (!gfid) + goto out; + uuid_clear (gfid); if (!loc) goto out; @@ -630,6 +632,14 @@ loc_gfid_utoa (loc_t *loc) else if (loc->inode && (!uuid_is_null (loc->inode->gfid))) uuid_copy (gfid, loc->inode->gfid); out: + return; +} + +char* +loc_gfid_utoa (loc_t *loc) +{ + uuid_t gfid; + loc_gfid (loc, gfid); return uuid_utoa (gfid); } |