const struct Maildir_entry *a = va, *b = vb;
if (a->mtime > b->mtime)
return 1;
- else if (a->mtime < b->mtime)
+ if (a->mtime < b->mtime)
return -1;
- else
- return 0;
+ return 0;
}
int
* a POP server?
*/
if (inc_type == INC_POP) {
- struct nmh_creds creds = { 0, 0, 0 };
-
if (auth_svc == NULL) {
if (saslmech && ! strcasecmp(saslmech, "xoauth2")) {
adios (NULL, "must specify -authservice with -saslmech xoauth2");
}
- nmh_get_credentials (host, user, sasl, &creds);
} else {
if (user == NULL) {
adios (NULL, "must specify -user with -saslmech xoauth2");
}
- creds.user = user;
}
/*
* initialize POP connection
*/
- if (pop_init (host, port, creds.user, creds.password, proxy, snoop,
- sasl, saslmech, tls, auth_svc) == NOTOK)
+ if (pop_init (host, port, user, proxy, snoop, sasl, saslmech,
+ tls, auth_svc) == NOTOK)
adios (NULL, "%s", response);
/* Check if there are any messages */
qsort (Maildir, num_maildir_entries, sizeof(*Maildir), maildir_srt);
}
- if ((cp = strdup(newmail)) == (char *)0)
+ if ((cp = strdup(newmail)) == NULL)
adios (NULL, "error allocating memory to copy newmail");
newmail = cp;
folder = getfolder (0);
maildir = m_maildir (folder);
- if ((maildir_copy = strdup(maildir)) == (char *)0)
+ if ((maildir_copy = strdup(maildir)) == NULL)
adios (maildir, "error allocating memory to copy maildir");
if (!folder_exists(maildir)) {
*/
(void)snprintf(b, sizeof (b), "%s/%d", maildir_copy, msgnum + 1);
- (void)ext_hook("add-hook", b, (char *)0);
+ (void)ext_hook("add-hook", b, NULL);
if (aud)
fputs (charstring_buffer (scanl), aud);
*/
(void)snprintf(b, sizeof (b), "%s/%d", maildir_copy, msgnum + 1);
- (void)ext_hook("add-hook", b, (char *)0);
+ (void)ext_hook("add-hook", b, NULL);
if (aud)
fputs (charstring_buffer (scanl), aud);