int of, cf;
- struct Context *tmpctx = NULL;
struct Message *msg = NULL;
FILE *fp = NULL;
omagic = MboxType;
MboxType = MUTT_MBOX;
- tmpctx = mx_mbox_open(tmp, MUTT_NEWFOLDER);
+ struct Context *tmpctx = mx_mbox_open(tmp, MUTT_NEWFOLDER);
MboxType = omagic;
static void imap_msn_index_to_uid_seqset(struct Buffer *b, struct ImapMboxData *mdata)
{
int first = 1, state = 0;
- bool match = false;
unsigned int cur_uid = 0, last_uid = 0;
unsigned int range_begin = 0, range_end = 0;
for (unsigned int msn = 1; msn <= mdata->max_msn + 1; msn++)
{
- match = false;
+ bool match = false;
if (msn <= mdata->max_msn)
{
struct Email *cur_header = mdata->msn_index[msn - 1];
*/
int mutt_seqset_iterator_next(struct SeqsetIterator *iter, unsigned int *next)
{
- char *range_sep;
-
if (!iter || !next)
return -1;
else
*(iter->substr_end) = '\0';
- range_sep = strchr(iter->substr_cur, ':');
+ char *range_sep = strchr(iter->substr_cur, ':');
if (range_sep)
*range_sep++ = '\0';
static int parse_ifdef(struct Buffer *buf, struct Buffer *s, unsigned long data,
struct Buffer *err)
{
- bool res = false;
struct Buffer token = { 0 };
mutt_extract_token(buf, s, 0);
/* is the item defined as a variable? */
struct HashElem *he = cs_get_elem(Config, buf->data);
- res = (he != NULL);
+ bool res = (he != NULL);
/* is the item a compiled-in feature? */
if (!res)
{
MonitorFilesChanged = 1;
mutt_debug(3, "file change(s) detected\n");
- int len;
char *ptr = buf;
const struct inotify_event *event;
while (true)
{
- len = read(INotifyFd, buf, sizeof(buf));
+ int len = read(INotifyFd, buf, sizeof(buf));
if (len == -1)
{
if (errno != EAGAIN)
{
const char *basename = NULL;
char parent[PATH_MAX];
- char *p = NULL;
mutt_str_strfcpy(parent, path, sizeof(parent));
- p = strrchr(parent, '/');
+ char *p = strrchr(parent, '/');
if (p)
{
*p = '\0';
if (match)
{
- struct CryptKeyInfo *tmp = NULL;
-
- tmp = crypt_copy_key(k);
+ struct CryptKeyInfo *tmp = crypt_copy_key(k);
*matches_endp = tmp;
matches_endp = &tmp->next;
(ps && (mutt_str_strcasecmp(ps, crypt_short_keyid(k)) == 0)) ||
mutt_str_stristr(k->uid, p))
{
- struct CryptKeyInfo *tmp = NULL;
-
mutt_debug(5, "match.\n");
- tmp = crypt_copy_key(k);
+ struct CryptKeyInfo *tmp = crypt_copy_key(k);
*matches_endp = tmp;
matches_endp = &tmp->next;
}
int pgpinfd, int pgpoutfd, int pgperrfd,
enum PgpRing keyring, struct ListHead *hints)
{
- struct Buffer *uids = NULL;
char quoted[HUGE_STRING];
- pid_t rc;
-
- uids = mutt_buffer_new();
+ struct Buffer *uids = mutt_buffer_new();
mutt_buffer_increase_size(uids, HUGE_STRING);
struct ListNode *np = NULL;
mutt_buffer_addch(uids, ' ');
}
- rc = pgp_invoke(pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, 0, NULL,
- NULL, uids->data,
- keyring == PGP_SECRING ? PgpListSecringCommand : PgpListPubringCommand);
+ pid_t rc = pgp_invoke(
+ pgpin, pgpout, pgperr, pgpinfd, pgpoutfd, pgperrfd, 0, NULL, NULL, uids->data,
+ keyring == PGP_SECRING ? PgpListSecringCommand : PgpListPubringCommand);
mutt_buffer_free(&uids);
return rc;
{
bool is_quote = false;
regmatch_t pmatch_internal[1], smatch[1];
- char c;
if (!pmatch)
pmatch = pmatch_internal;
{
if (smatch[0].rm_so > 0)
{
- c = line[smatch[0].rm_so];
+ char c = line[smatch[0].rm_so];
line[smatch[0].rm_so] = 0;
if (regexec(QuoteRegex->regex, line, 1, pmatch, 0) == 0)
*/
int mix_send_message(struct ListHead *chain, const char *tempfile)
{
- struct Buffer *cmd = NULL;
char cd_quoted[STRING];
int i = 0;
- cmd = mutt_buffer_new();
+ struct Buffer *cmd = mutt_buffer_new();
mutt_buffer_increase_size(cmd, HUGE_STRING);
mutt_buffer_printf(cmd, "cat %s | %s -m ", tempfile, Mixmaster);