Changeset 745 for trunk/server/nsswitch/libwbclient/wbc_guid.c
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/nsswitch/libwbclient/wbc_guid.c
r414 r745 30 30 char **guid_string) 31 31 { 32 wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;32 char *result; 33 33 34 if (!guid) {35 wbc_status = WBC_ERR_INVALID_PARAM;36 BAIL_ON_WBC_ERROR(wbc_status);34 result = (char *)wbcAllocateMemory(37, 1, NULL); 35 if (result == NULL) { 36 return WBC_ERR_NO_MEMORY; 37 37 } 38 snprintf(result, 37, 39 "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", 40 guid->time_low, guid->time_mid, 41 guid->time_hi_and_version, 42 guid->clock_seq[0], 43 guid->clock_seq[1], 44 guid->node[0], guid->node[1], 45 guid->node[2], guid->node[3], 46 guid->node[4], guid->node[5]); 47 *guid_string = result; 38 48 39 *guid_string = talloc_asprintf(NULL, 40 "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", 41 guid->time_low, guid->time_mid, 42 guid->time_hi_and_version, 43 guid->clock_seq[0], 44 guid->clock_seq[1], 45 guid->node[0], guid->node[1], 46 guid->node[2], guid->node[3], 47 guid->node[4], guid->node[5]); 48 BAIL_ON_PTR_ERROR((*guid_string), wbc_status); 49 50 wbc_status = WBC_ERR_SUCCESS; 51 52 done: 53 return wbc_status; 49 return WBC_ERR_SUCCESS; 54 50 } 55 51
Note:
See TracChangeset
for help on using the changeset viewer.