projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drop mem_alloc and mem_free, use my own hand crafted optmized macros that
[apps/madmutt.git]
/
pop
/
pop.c
diff --git
a/pop/pop.c
b/pop/pop.c
index
34d1cc7
..
b8e9e06
100644
(file)
--- a/
pop/pop.c
+++ b/
pop/pop.c
@@
-11,6
+11,8
@@
# include "config.h"
#endif
# include "config.h"
#endif
+#include <lib-lib/mem.h>
+
#include "mutt.h"
#include "mx.h"
#include "pop.h"
#include "mutt.h"
#include "mx.h"
#include "pop.h"
@@
-246,7
+248,7
@@
int pop_open_mailbox (CONTEXT * ctx)
if (!conn)
return -1;
if (!conn)
return -1;
-
mem_free
(&ctx->path);
+
p_delete
(&ctx->path);
ctx->path = str_dup (buf);
pop_data = mem_calloc (1, sizeof (POP_DATA));
ctx->path = str_dup (buf);
pop_data = mem_calloc (1, sizeof (POP_DATA));
@@
-291,7
+293,7
@@
static void pop_clear_cache (POP_DATA * pop_data)
for (i = 0; i < POP_CACHE_LEN; i++) {
if (pop_data->cache[i].path) {
unlink (pop_data->cache[i].path);
for (i = 0; i < POP_CACHE_LEN; i++) {
if (pop_data->cache[i].path) {
unlink (pop_data->cache[i].path);
-
mem_free
(&pop_data->cache[i].path);
+
p_delete
(&pop_data->cache[i].path);
}
}
}
}
}
}
@@
-349,7
+351,7
@@
int pop_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno)
else {
/* clear the previous entry */
unlink (cache->path);
else {
/* clear the previous entry */
unlink (cache->path);
-
mem_free
(&cache->path);
+
p_delete
(&cache->path);
}
}
}
}
@@
-532,7
+534,7
@@
void pop_fetch_mail (void)
strcpy (p, PopHost); /* __STRCPY_CHECKED__ */
ret = pop_parse_path (url, &acct);
strcpy (p, PopHost); /* __STRCPY_CHECKED__ */
ret = pop_parse_path (url, &acct);
-
mem_free
(&url);
+
p_delete
(&url);
if (ret) {
mutt_error (_("%s is an invalid POP path"), PopHost);
return;
if (ret) {
mutt_error (_("%s is an invalid POP path"), PopHost);
return;
@@
-547,7
+549,7
@@
void pop_fetch_mail (void)
if (pop_open_connection (pop_data) < 0) {
mutt_socket_free (pop_data->conn);
if (pop_open_connection (pop_data) < 0) {
mutt_socket_free (pop_data->conn);
-
mem_free
(&pop_data);
+
p_delete
(&pop_data);
return;
}
return;
}
@@
-649,11
+651,11
@@
finish:
if (pop_query (pop_data, buffer, sizeof (buffer)) == PQ_NOT_CONNECTED)
goto fail;
mutt_socket_close (conn);
if (pop_query (pop_data, buffer, sizeof (buffer)) == PQ_NOT_CONNECTED)
goto fail;
mutt_socket_close (conn);
-
mem_free
(&pop_data);
+
p_delete
(&pop_data);
return;
fail:
mutt_error _("Server closed connection!");
mutt_socket_close (conn);
return;
fail:
mutt_error _("Server closed connection!");
mutt_socket_close (conn);
-
mem_free
(&pop_data);
+
p_delete
(&pop_data);
}
}