Use GUID_buf_string(), dom_sid_str_buf() and talloc_asprintf_addbuf()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
tokens[i][0] = toupper(tokens[i][0]);
ret = talloc_strdup(mem_ctx, tokens[0]);
- if (ret == NULL) {
- talloc_free(tokens);
- return NULL;
- }
for (i = 1; tokens[i] != NULL; i++) {
- ret = talloc_asprintf_append_buffer(ret, "%s", tokens[i]);
- if (ret == NULL) {
- talloc_free(tokens);
- return NULL;
- }
+ talloc_asprintf_addbuf(&ret, "%s", tokens[i]);
}
talloc_free(tokens);