diff options
author | Gerald Carter <jerry@samba.org> | 2004-12-16 12:30:49 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2004-12-16 12:30:49 +0000 |
commit | 8d91e07ef22ad3ed484b04bc4968380a24940696 (patch) | |
tree | b5b8989f8da9ef7f852081f0460995386edd4b5d /source/lib/iconv.c | |
parent | 1a878c865637feb80206c0dc599acebf7f4a46bd (diff) | |
download | samba-3.0.10.tar.gz samba-3.0.10.tar.xz samba-3.0.10.zip |
r4231: commiting changes to 3.0.10samba-3.0.10
Diffstat (limited to 'source/lib/iconv.c')
-rw-r--r-- | source/lib/iconv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/lib/iconv.c b/source/lib/iconv.c index 66a6e6cd8bc..d58165fed03 100644 --- a/source/lib/iconv.c +++ b/source/lib/iconv.c @@ -209,15 +209,15 @@ smb_iconv_t smb_iconv_open(const char *tocode, const char *fromcode) from = charsets; to = charsets; - ret = (smb_iconv_t)malloc(sizeof(*ret)); + ret = SMB_MALLOC_P(struct _smb_iconv_t); if (!ret) { errno = ENOMEM; return (smb_iconv_t)-1; } - memset(ret, 0, sizeof(*ret)); + memset(ret, 0, sizeof(struct _smb_iconv_t)); - ret->from_name = strdup(fromcode); - ret->to_name = strdup(tocode); + ret->from_name = SMB_STRDUP(fromcode); + ret->to_name = SMB_STRDUP(tocode); /* check for the simplest null conversion */ if (strcasecmp(fromcode, tocode) == 0) { |