X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mutt_idna.c;h=96d33d2f571a911290826eee5f80a797899ae39c;hp=1ad3b6290f25701e91a88e6bd44fb017322db405;hb=ebad7634114993e2e96fa66fda4b705d05832193;hpb=8e037c67a88cb4680c4391134c578e3b55a80f8a diff --git a/mutt_idna.c b/mutt_idna.c index 1ad3b62..96d33d2 100644 --- a/mutt_idna.c +++ b/mutt_idna.c @@ -18,7 +18,6 @@ #include "charset.h" #include "mutt_idna.h" -#include "lib/mem.h" #include "lib/intl.h" #include "lib/str.h" #include "lib/debug.h" @@ -131,8 +130,7 @@ static int mbox_to_udomain (const char *mbx, char **user, char **domain) p = strchr (mbx, '@'); if (!p || !p[1]) return -1; - *user = mem_calloc ((p - mbx + 1), sizeof (mbx[0])); - strfcpy (*user, mbx, (p - mbx + 1)); + *user = p_dupstr(mbx, p - mbx); *domain = str_dup (p + 1); return 0; } @@ -158,7 +156,7 @@ int mutt_addrlist_to_idna (ADDRESS * a, char **err) *err = str_dup (domain); } else { - mem_realloc (&a->mailbox, str_len (user) + str_len (tmp) + 2); + p_realloc(&a->mailbox, str_len(user) + str_len(tmp) + 2); sprintf (a->mailbox, "%s@%s", NONULL (user), NONULL (tmp)); /* __SPRINTF_CHECKED__ */ } @@ -185,7 +183,7 @@ int mutt_addrlist_to_local (ADDRESS * a) continue; if (mutt_idna_to_local (domain, &tmp, 0) == 0) { - mem_realloc (&a->mailbox, str_len (user) + str_len (tmp) + 2); + p_realloc(&a->mailbox, str_len(user) + str_len(tmp) + 2); sprintf (a->mailbox, "%s@%s", NONULL (user), NONULL (tmp)); /* __SPRINTF_CHECKED__ */ } @@ -219,7 +217,7 @@ const char *mutt_addr_for_display (ADDRESS * a) return a->mailbox; } - mem_realloc (&buff, str_len (tmp) + str_len (user) + 2); + p_realloc(&buff, str_len(tmp) + str_len(user) + 2); sprintf (buff, "%s@%s", NONULL (user), NONULL (tmp)); /* __SPRINTF_CHECKED__ */ p_delete(&tmp); p_delete(&user);