projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
various code simplifications.
[apps/madmutt.git]
/
lib-mime
/
rfc822address.c
diff --git
a/lib-mime/rfc822address.c
b/lib-mime/rfc822address.c
index
ad4e117
..
36485d3
100644
(file)
--- a/
lib-mime/rfc822address.c
+++ b/
lib-mime/rfc822address.c
@@
-32,11
+32,12
@@
void rfc822_qualify(address_t *addr, const char *host)
{
void rfc822_qualify(address_t *addr, const char *host)
{
- char *p;
+ if (!host)
+ return;
for (; addr; addr = addr->next) {
if (!addr->group && addr->mailbox && !strchr(addr->mailbox, '@')) {
for (; addr; addr = addr->next) {
if (!addr->group && addr->mailbox && !strchr(addr->mailbox, '@')) {
- p = p_new(char, m_strlen(addr->mailbox) + m_strlen(host) + 2);
+
char *
p = p_new(char, m_strlen(addr->mailbox) + m_strlen(host) + 2);
sprintf(p, "%s@%s", addr->mailbox, host);
p_delete(&addr->mailbox);
addr->mailbox = p;
sprintf(p, "%s@%s", addr->mailbox, host);
p_delete(&addr->mailbox);
addr->mailbox = p;