summaryrefslogtreecommitdiffabout
path: root/kmicromail/libetpan/generic/nntpstorage.c
Side-by-side diff
Diffstat (limited to 'kmicromail/libetpan/generic/nntpstorage.c') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/libetpan/generic/nntpstorage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kmicromail/libetpan/generic/nntpstorage.c b/kmicromail/libetpan/generic/nntpstorage.c
index 5ba333b..89974cd 100644
--- a/kmicromail/libetpan/generic/nntpstorage.c
+++ b/kmicromail/libetpan/generic/nntpstorage.c
@@ -50,49 +50,49 @@
#define NNTPS_DEFAULT_PORT 563
static int nntp_mailstorage_connect(struct mailstorage * storage);
static int nntp_mailstorage_get_folder_session(struct mailstorage * storage,
char * pathname, mailsession ** result);
static void nntp_mailstorage_uninitialize(struct mailstorage * storage);
static mailstorage_driver nntp_mailstorage_driver = {
.sto_name = "nntp",
.sto_connect = nntp_mailstorage_connect,
.sto_get_folder_session = nntp_mailstorage_get_folder_session,
.sto_uninitialize = nntp_mailstorage_uninitialize,
};
int nntp_mailstorage_init(struct mailstorage * storage,
char * nn_servername, uint16_t nn_port,
char * nn_command,
int nn_connection_type, int nn_auth_type,
char * nn_login, char * nn_password,
int nn_cached, char * nn_cache_directory, char * nn_flags_directory)
{
struct nntp_mailstorage * nntp_storage;
int res;
- nntp_storage = malloc(sizeof(struct nntp_mailstorage));
+ nntp_storage = malloc(sizeof(* nntp_storage));
if (nntp_storage == NULL) {
res = MAIL_ERROR_MEMORY;
goto err;
}
nntp_storage->nntp_servername = strdup(nn_servername);
if (nntp_storage->nntp_servername == NULL) {
res = MAIL_ERROR_MEMORY;
goto free;
}
nntp_storage->nntp_connection_type = nn_connection_type;
if (nn_port == 0) {
switch (nn_connection_type) {
case CONNECTION_TYPE_PLAIN:
case CONNECTION_TYPE_COMMAND:
nn_port = NNTP_DEFAULT_PORT;
break;
case CONNECTION_TYPE_TLS:
case CONNECTION_TYPE_COMMAND_TLS:
nn_port = NNTPS_DEFAULT_PORT;
break;