diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-09-07 16:54:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:05:32 -0500 |
commit | b50ef4caef44e3b45445728818f3bca09273249d (patch) | |
tree | cb47af18870ae47c20ee204c9eb75e4e1303d4ca /source4/lib/util/util_str.c | |
parent | 307a45127b863836d4c301722ccc04ee94c457cb (diff) | |
download | samba-b50ef4caef44e3b45445728818f3bca09273249d.tar.gz samba-b50ef4caef44e3b45445728818f3bca09273249d.tar.bz2 samba-b50ef4caef44e3b45445728818f3bca09273249d.zip |
r25007: Remove more uses of pstring, move ntlmauth-specific utility function to ntlm-auth.c
(This used to be commit 6f224480b230ab7ccfc0417c13e7f4fc3f6f2a13)
Diffstat (limited to 'source4/lib/util/util_str.c')
-rw-r--r-- | source4/lib/util/util_str.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source4/lib/util/util_str.c b/source4/lib/util/util_str.c index 67e59474fd..eb8155cc7c 100644 --- a/source4/lib/util/util_str.c +++ b/source4/lib/util/util_str.c @@ -23,7 +23,6 @@ #include "includes.h" #include "libcli/raw/smb.h" -#include "pstring.h" #include "system/locale.h" /** @@ -237,7 +236,7 @@ _PUBLIC_ void hex_encode(const unsigned char *buff_in, size_t len, char **out_he int i; char *hex_buffer; - *out_hex_buffer = smb_xmalloc((len*2)+1); + *out_hex_buffer = malloc_array_p(char, (len*2)+1); hex_buffer = *out_hex_buffer; for (i = 0; i < len; i++) @@ -457,7 +456,7 @@ _PUBLIC_ const char *str_format_nbt_domain(TALLOC_CTX *mem_ctx, const char *s) if (!s || !*s) { return talloc_strdup(mem_ctx, ""); } - ret = talloc_size(mem_ctx, strlen(s)+2); + ret = talloc_array(mem_ctx, char, strlen(s)+2); if (!ret) { return ret; } @@ -566,7 +565,7 @@ _PUBLIC_ char *attrib_string(TALLOC_CTX *mem_ctx, uint32_t attrib) }; char *ret; - ret = talloc_size(mem_ctx, ARRAY_SIZE(attr_strs)+1); + ret = talloc_array(mem_ctx, char, ARRAY_SIZE(attr_strs)+1); if (!ret) { return NULL; } |