if ((C_SortAlias & SORT_MASK) != SORT_ORDER)
{
qsort(alias_table, menu->max, sizeof(struct Alias *),
- (C_SortAlias & SORT_MASK) == SORT_ADDRESS ? alias_sort_address : alias_sort_alias);
+ ((C_SortAlias & SORT_MASK) == SORT_ADDRESS) ? alias_sort_address : alias_sort_alias);
}
for (i = 0; i < menu->max; i++)
size_t mailboxlen = mutt_str_strlen(mailbox);
len = snprintf(dst, dstlen, "%s/%s%s%s", C_MessageCachedir, host, NONULL(mailbox),
- (mailboxlen != 0 && mailbox[mailboxlen - 1] == '/') ? "" : "/");
+ ((mailboxlen != 0) && (mailbox[mailboxlen - 1] == '/')) ? "" : "/");
mutt_encode_path(dst, dstlen, dst);
if (stat(path, &st) < 0)
rc = -1;
else
- rc = S_ISREG(st.st_mode) && st.st_size != 0 ? 0 : -1;
+ rc = (S_ISREG(st.st_mode) && (st.st_size != 0)) ? 0 : -1;
- mutt_debug(LL_DEBUG3, "bcache: exists: '%s': %s\n", path, rc == 0 ? "yes" : "no");
+ mutt_debug(LL_DEBUG3, "bcache: exists: '%s': %s\n", path, (rc == 0) ? "yes" : "no");
return rc;
}
else
{
time_t tnow = time(NULL);
- t_fmt = tnow - folder->ff->mtime < 31536000 ? "%b %d %H:%M" : "%b %d %Y";
+ t_fmt = ((tnow - folder->ff->mtime) < 31536000) ? "%b %d %H:%M" : "%b %d %Y";
}
if (!do_locales)
"@" :
(S_ISDIR(folder->ff->mode) ?
"/" :
- ((folder->ff->mode & S_IXUSR) != 0 ? "*" : ""))) :
+ (((folder->ff->mode & S_IXUSR) != 0) ? "*" : ""))) :
"");
mutt_format_s(buf, buflen, prec, fn);
{
snprintf(permission, sizeof(permission), "%c%c%c%c%c%c%c%c%c%c",
S_ISDIR(folder->ff->mode) ? 'd' : (S_ISLNK(folder->ff->mode) ? 'l' : '-'),
- (folder->ff->mode & S_IRUSR) != 0 ? 'r' : '-',
- (folder->ff->mode & S_IWUSR) != 0 ? 'w' : '-',
- (folder->ff->mode & S_ISUID) != 0 ?
+ ((folder->ff->mode & S_IRUSR) != 0) ? 'r' : '-',
+ ((folder->ff->mode & S_IWUSR) != 0) ? 'w' : '-',
+ ((folder->ff->mode & S_ISUID) != 0) ?
's' :
- (folder->ff->mode & S_IXUSR) != 0 ? 'x' : '-',
- (folder->ff->mode & S_IRGRP) != 0 ? 'r' : '-',
- (folder->ff->mode & S_IWGRP) != 0 ? 'w' : '-',
- (folder->ff->mode & S_ISGID) != 0 ?
+ ((folder->ff->mode & S_IXUSR) != 0) ? 'x' : '-',
+ ((folder->ff->mode & S_IRGRP) != 0) ? 'r' : '-',
+ ((folder->ff->mode & S_IWGRP) != 0) ? 'w' : '-',
+ ((folder->ff->mode & S_ISGID) != 0) ?
's' :
- (folder->ff->mode & S_IXGRP) != 0 ? 'x' : '-',
- (folder->ff->mode & S_IROTH) != 0 ? 'r' : '-',
- (folder->ff->mode & S_IWOTH) != 0 ? 'w' : '-',
- (folder->ff->mode & S_ISVTX) != 0 ?
+ ((folder->ff->mode & S_IXGRP) != 0) ? 'x' : '-',
+ ((folder->ff->mode & S_IROTH) != 0) ? 'r' : '-',
+ ((folder->ff->mode & S_IWOTH) != 0) ? 'w' : '-',
+ ((folder->ff->mode & S_ISVTX) != 0) ?
't' :
- (folder->ff->mode & S_IXOTH) != 0 ? 'x' : '-');
+ ((folder->ff->mode & S_IXOTH) != 0) ? 'x' : '-');
mutt_format_s(buf, buflen, prec, permission);
}
#ifdef USE_IMAP
"@" :
(S_ISDIR(folder->ff->mode) ?
"/" :
- ((folder->ff->mode & S_IXUSR) != 0 ? "*" : ""))) :
+ (((folder->ff->mode & S_IXUSR) != 0) ? "*" : ""))) :
"");
mutt_format_s(buf, buflen, prec, fn);
return SASL_BADPARAM;
mutt_debug(LL_DEBUG2, "getting %s for %s:%u\n",
- id == SASL_CB_AUTHNAME ? "authname" : "user", account->host,
+ (id == SASL_CB_AUTHNAME) ? "authname" : "user", account->host,
account->port);
if (id == SASL_CB_AUTHNAME)
for (unsigned int i = 0; i < n; i++)
{
char ch[8];
- snprintf(ch, sizeof(ch), "%02X%s", md[i], (i % 2 ? " " : ""));
+ snprintf(ch, sizeof(ch), "%02X%s", md[i], ((i % 2) ? " " : ""));
mutt_str_strcat(s, l, ch);
}
}
ret.ch = ch;
ret.op = 0;
- return ch == ctrl('G') ? err : ret;
+ return (ch == ctrl('G')) ? err : ret;
}
/**
* around the screen in the even the question is wider than the screen,
* ensure there is enough room for the answer and truncate the question
* to fit. */
- safe_asprintf(&answer_string, " ([%s]/%s): ", def == MUTT_YES ? yes : no,
- def == MUTT_YES ? no : yes);
+ safe_asprintf(&answer_string, " ([%s]/%s): ", (def == MUTT_YES) ? yes : no,
+ (def == MUTT_YES) ? no : yes);
answer_string_wid = mutt_strwidth(answer_string);
msg_wid = mutt_strwidth(msg);
if (def != MUTT_ABORT)
{
- addstr((char *) (def == MUTT_YES ? yes : no));
+ addstr((char *) ((def == MUTT_YES) ? yes : no));
mutt_refresh();
}
else
buflen -= k2;
}
}
- w = (int) buflen < min_width ? buflen : min_width;
+ w = ((int) buflen < min_width) ? buflen : min_width;
if (w <= 0)
*p = '\0';
else if (justify == FMT_RIGHT) /* right justify */
}
const CopyHeaderFlags chflags =
- CH_NOLEN | ((m->magic == MUTT_MBOX || m->magic == MUTT_MMDF) ? 0 : CH_NOSTATUS);
+ CH_NOLEN | (((m->magic == MUTT_MBOX) || (m->magic == MUTT_MMDF)) ? 0 : CH_NOSTATUS);
rc = mutt_append_message(tmpctx->mailbox, m, e, 0, chflags);
int oerrno = errno;
assert(errno == E2BIG);
iconv_close(cd);
assert(ib > d);
- return (ib - d == dlen) ? dlen : ib - d + 1;
+ return ((ib - d) == dlen) ? dlen : ib - d + 1;
}
iconv_close(cd);
}
p = buf;
- cp = (op == 'd' || op == 'D') ? (NONULL(C_DateFormat)) : src;
+ cp = ((op == 'd') || (op == 'D')) ? (NONULL(C_DateFormat)) : src;
bool do_locales;
if (*cp == '!')
{
do_locales = true;
size_t len = buflen - 1;
- while (len > 0 && (((op == 'd' || op == 'D') && *cp) ||
- (op == '{' && *cp != '}') || (op == '[' && *cp != ']') ||
- (op == '(' && *cp != ')') || (op == '<' && *cp != '>')))
+ while ((len > 0) &&
+ ((((op == 'd') || (op == 'D')) && *cp) ||
+ ((op == '{') && (*cp != '}')) || ((op == '[') && (*cp != ']')) ||
+ ((op == '(') && (*cp != ')')) || ((op == '<') && (*cp != '>'))))
{
if (*cp == '%')
{
}
else
{
- const int col_a = MuttIndexWindow->cols > 83 ? (MuttIndexWindow->cols - 32) >> 2 : 12;
- col_b = MuttIndexWindow->cols > 49 ? (MuttIndexWindow->cols - 10) >> 1 : 19;
+ const int col_a =
+ (MuttIndexWindow->cols > 83) ? (MuttIndexWindow->cols - 32) >> 2 : 12;
+ col_b = (MuttIndexWindow->cols > 49) ? (MuttIndexWindow->cols - 10) >> 1 : 19;
col = pad(fp, mutt_strwidth(t1), col_a);
}
{
char relpath[2];
/* folder may be "/" */
- snprintf(relpath, sizeof(relpath), "%c", n < 0 ? '\0' : adata->delim);
+ snprintf(relpath, sizeof(relpath), "%c", (n < 0) ? '\0' : adata->delim);
if (showparents)
add_folder(adata->delim, relpath, true, false, state, true);
if (!state->folder)
mutt_buffer_free(&sync_cmd);
imap_mdata_free((void *) &dest_mdata);
- return (rc == IMAP_EXEC_SUCCESS ? 0 : -1);
+ return ((rc == IMAP_EXEC_SUCCESS) ? 0 : -1);
}
/**
if (C_Resolve)
{
menu->current =
- (op == OP_MAIN_READ_THREAD ? mutt_next_thread(CUR_EMAIL) :
- mutt_next_subthread(CUR_EMAIL));
+ ((op == OP_MAIN_READ_THREAD) ? mutt_next_thread(CUR_EMAIL) :
+ mutt_next_subthread(CUR_EMAIL));
if (menu->current == -1)
{
menu->current = menu->oldcurrent;
break;
struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
el_add_tagged(&el, Context, CUR_EMAIL, tag);
- ci_send_message((op == OP_FOLLOWUP ? SEND_REPLY : SEND_FORWARD) | SEND_NEWS,
+ ci_send_message(((op == OP_FOLLOWUP) ? SEND_REPLY : SEND_FORWARD) | SEND_NEWS,
NULL, NULL, Context, &el);
el_free(&el);
}
if (mutt_addrlist_to_intl(addr, &estr))
{
mutt_buffer_printf(err, _("%sgroup: warning: bad IDN '%s'"),
- data == 1 ? "un" : "", estr);
+ (data == 1) ? "un" : "", estr);
mutt_addr_free(&addr);
FREE(&estr);
goto bail;
while (true)
{
- int i = C_Timeout > 0 ? C_Timeout : 60;
+ int i = (C_Timeout > 0) ? C_Timeout : 60;
#ifdef USE_IMAP
/* keepalive may need to run more frequently than C_Timeout allows */
if (C_ImapKeepalive)
imap_keepalive();
else
{
- while (C_ImapKeepalive && C_ImapKeepalive < i)
+ while (C_ImapKeepalive && (C_ImapKeepalive < i))
{
mutt_getch_timeout(C_ImapKeepalive * 1000);
tmp = mutt_getch();
maildir_canon_filename(unique, msg);
FILE *fp = md_open_find_message(folder, mutt_b2s(unique),
- new_hits > cur_hits ? "new" : "cur", newname);
+ (new_hits > cur_hits) ? "new" : "cur", newname);
if (fp || (errno != ENOENT))
{
if ((new_hits < UINT_MAX) && (cur_hits < UINT_MAX))
{
- new_hits += (new_hits > cur_hits ? 1 : 0);
- cur_hits += (new_hits > cur_hits ? 0 : 1);
+ new_hits += ((new_hits > cur_hits) ? 1 : 0);
+ cur_hits += ((new_hits > cur_hits) ? 0 : 1);
}
goto cleanup;
}
fp = md_open_find_message(folder, mutt_b2s(unique),
- new_hits > cur_hits ? "cur" : "new", newname);
+ (new_hits > cur_hits) ? "cur" : "new", newname);
if (fp || (errno != ENOENT))
{
if ((new_hits < UINT_MAX) && (cur_hits < UINT_MAX))
{
- new_hits += (new_hits > cur_hits ? 0 : 1);
- cur_hits += (new_hits > cur_hits ? 1 : 0);
+ new_hits += ((new_hits > cur_hits) ? 0 : 1);
+ cur_hits += ((new_hits > cur_hits) ? 1 : 0);
}
goto cleanup;
{
/* we do "cur" on the first iteration since it's more likely that we'll
* find old messages without having to scan both subdirs */
- snprintf(realpath, sizeof(realpath), "%s/%s", path, iter == 0 ? "cur" : "new");
+ snprintf(realpath, sizeof(realpath), "%s/%s", path, (iter == 0) ? "cur" : "new");
dp = opendir(realpath);
if (!dp)
return -1;
regex_t re;
char buf[128];
char *search_buf =
- menu->menu >= 0 && menu->menu < MENU_MAX ? SearchBuffers[menu->menu] : NULL;
+ ((menu->menu >= 0) && (menu->menu < MENU_MAX)) ? SearchBuffers[menu->menu] : NULL;
if (!(search_buf && *search_buf) || ((op != OP_SEARCH_NEXT) && (op != OP_SEARCH_OPPOSITE)))
{
search_buf = SearchBuffers[menu->menu];
}
menu->search_dir =
- (op == OP_SEARCH || op == OP_SEARCH_NEXT) ? MUTT_SEARCH_DOWN : MUTT_SEARCH_UP;
+ ((op == OP_SEARCH) || (op == OP_SEARCH_NEXT)) ? MUTT_SEARCH_DOWN : MUTT_SEARCH_UP;
}
search_dir = (menu->search_dir == MUTT_SEARCH_UP) ? -1 : 1;
if (C_WrapSearch && (wrap++ == 0))
{
- rc = search_dir == 1 ? 0 : menu->max - 1;
+ rc = (search_dir == 1) ? 0 : menu->max - 1;
goto search_next;
}
regfree(&re);
/* always apply iconv-hooks to suit system's iconv tastes */
tocode2 = mutt_ch_iconv_lookup(tocode1);
- tocode2 = (tocode2) ? tocode2 : tocode1;
+ tocode2 = tocode2 ? tocode2 : tocode1;
fromcode2 = mutt_ch_iconv_lookup(fromcode1);
- fromcode2 = (fromcode2) ? fromcode2 : fromcode1;
+ fromcode2 = fromcode2 ? fromcode2 : fromcode1;
/* call system iconv with names it appreciates */
cd = iconv_open(tocode2, fromcode2);
struct tm t;
time_t tz;
- t.tm_mday = (s[0] == ' ' ? s[1] - '0' : (s[0] - '0') * 10 + (s[1] - '0'));
+ t.tm_mday = ((s[0] == ' ') ? s[1] - '0' : (s[0] - '0') * 10 + (s[1] - '0'));
s += 2;
if (*s != '-')
return 0;
k = mbrtowc(&wc, s, n, &mbstate);
if (width)
*width = wcwidth(wc);
- return (k == (size_t)(-1) || k == (size_t)(-2)) ? -1 : k;
+ return ((k == (size_t)(-1)) || (k == (size_t)(-2))) ? -1 : k;
}
/**
if (md5ctx->buflen != 0)
{
size_t left_over = md5ctx->buflen;
- size_t add = (128 - left_over) > len ? len : (128 - left_over);
+ size_t add = ((128 - left_over) > len) ? len : (128 - left_over);
memcpy(&((char *) md5ctx->buffer)[left_over], buffer, add);
md5ctx->buflen += add;
path_len = sizeof(abs_path) - strlen(path);
- mutt_str_strncat(abs_path, sizeof(abs_path), path, path_len > 0 ? path_len : 0);
+ mutt_str_strncat(abs_path, sizeof(abs_path), path, (path_len > 0) ? path_len : 0);
path = realpath(abs_path, path);
if (!path && (errno != ENOENT))
for (unsigned int i = 0; i < 8; i++)
{
finalcount[i] =
- (unsigned char) ((sha1ctx->count[(i >= 4 ? 0 : 1)] >> ((3 - (i & 3)) * 8)) & 255); /* Endian independent */
+ (unsigned char) ((sha1ctx->count[((i >= 4) ? 0 : 1)] >> ((3 - (i & 3)) * 8)) &
+ 255); /* Endian independent */
}
c = 0200;
if (n != TYPE_OTHER)
{
snprintf(type, len, "%s/%s",
- n == TYPE_AUDIO ? "audio" :
- n == TYPE_APPLICATION ?
- "application" :
- n == TYPE_IMAGE ?
- "image" :
- n == TYPE_MESSAGE ?
- "message" :
- n == TYPE_MODEL ?
- "model" :
- n == TYPE_MULTIPART ?
- "multipart" :
- n == TYPE_TEXT ? "text" : n == TYPE_VIDEO ? "video" : "other",
+ (n == TYPE_AUDIO) ?
+ "audio" :
+ (n == TYPE_APPLICATION) ?
+ "application" :
+ (n == TYPE_IMAGE) ?
+ "image" :
+ (n == TYPE_MESSAGE) ?
+ "message" :
+ (n == TYPE_MODEL) ?
+ "model" :
+ (n == TYPE_MULTIPART) ?
+ "multipart" :
+ (n == TYPE_TEXT) ? "text" : (n == TYPE_VIDEO) ? "video" : "other",
tmp.subtype);
mutt_debug(LL_DEBUG1, "\"%s\" -> %s\n", b->filename, type);
}
}
if ((ctx->mailbox->magic == MUTT_MBOX) || (ctx->mailbox->magic == MUTT_MMDF))
chflags = CH_FROM | CH_UPDATE_LEN;
- chflags |= (ctx->mailbox->magic == MUTT_MAILDIR ? CH_NOSTATUS : CH_UPDATE);
+ chflags |= ((ctx->mailbox->magic == MUTT_MAILDIR) ? CH_NOSTATUS : CH_UPDATE);
if ((mutt_copy_message_fp(msg->fp, fp, en, 0, chflags) == 0) &&
(mx_msg_commit(ctx->mailbox, msg) == 0))
{
}
}
- mutt_debug(LL_DEBUG3, "return %d\n", count < 0 ? 0 : count);
+ mutt_debug(LL_DEBUG3, "return %d\n", (count < 0) ? 0 : count);
return (count < 0) ? 0 : count;
}
else if (cur->env->real_subj && tmp->message->env->real_subj)
{
cur->subject_changed =
- (mutt_str_strcmp(cur->env->real_subj, tmp->message->env->real_subj) != 0) ? true : false;
+ (mutt_str_strcmp(cur->env->real_subj, tmp->message->env->real_subj) != 0);
}
else
{
- cur->subject_changed =
- (cur->env->real_subj || tmp->message->env->real_subj) ? true : false;
+ cur->subject_changed = (cur->env->real_subj || tmp->message->env->real_subj);
}
}
}
msg->flags.flagged = e->flagged;
msg->flags.replied = e->replied;
msg->flags.read = e->read;
- msg->flags.draft = (flags & MUTT_SET_DRAFT) ? true : false;
+ msg->flags.draft = (flags & MUTT_SET_DRAFT);
msg->received = e->received;
}
val += *s - '0';
}
*number = val;
- return val < 0 ? NULL : s;
+ return (val < 0) ? NULL : s;
}
/**
level %= 10;
a_major = a_minor = a_micro = 0;
- a_plvl = parse_version_string(a, &a_major, level > 1 ? &a_minor : NULL,
- level > 2 ? &a_micro : NULL);
+ a_plvl = parse_version_string(a, &a_major, (level > 1) ? &a_minor : NULL,
+ (level > 2) ? &a_micro : NULL);
if (!a_plvl)
a_major = a_minor = a_micro = 0; /* Error. */
b_major = b_minor = b_micro = 0;
- b_plvl = parse_version_string(b, &b_major, level > 1 ? &b_minor : NULL,
- level > 2 ? &b_micro : NULL);
+ b_plvl = parse_version_string(b, &b_major, (level > 1) ? &b_minor : NULL,
+ (level > 2) ? &b_micro : NULL);
if (!b_plvl)
b_major = b_minor = b_micro = 0;
{
struct FgetConv *fc = NULL;
int ch;
- char *expected_charset = gpgcharset && *gpgcharset ? gpgcharset : "utf-8";
+ char *expected_charset = (gpgcharset && *gpgcharset) ? gpgcharset : "utf-8";
mutt_debug(LL_DEBUG3, "pgp: recoding inline from [%s] to [%s]\n",
expected_charset, C_Charset);
pid_t rc = pgp_invoke(fp_pgp_in, fp_pgp_out, fp_pgp_err, pgpinfd, pgpoutfd,
pgperrfd, 0, NULL, NULL, mutt_b2s(uids),
- keyring == PGP_SECRING ? C_PgpListSecringCommand : C_PgpListPubringCommand);
+ (keyring == PGP_SECRING) ? C_PgpListSecringCommand :
+ C_PgpListPubringCommand);
mutt_buffer_pool_release(&uids);
return rc;
if (mutt_str_startswith(email, mailbox, CASE_IGNORE))
rc = 1;
- rc = rc < 0 ? 0 : rc;
+ rc = (rc < 0) ? 0 : rc;
count++;
}
if (!mdata || mdata->deleted)
continue;
- if (off + strlen(mdata->group) + (mdata->desc ? strlen(mdata->desc) : 0) + 50 > buflen)
+ if ((off + strlen(mdata->group) + (mdata->desc ? strlen(mdata->desc) : 0) + 50) > buflen)
{
buflen *= 2;
mutt_mem_realloc(&buf, buflen);
if (!cont && (mutt_str_strcmp(".", adata->overview_fmt + off) == 0))
break;
- cont = chunk >= buflen - off ? 1 : 0;
+ cont = (chunk >= (buflen - off)) ? 1 : 0;
off += strlen(adata->overview_fmt + off);
if (!cont)
{
if (mutt_str_strcasestr(buf, variants[i]) != NULL)
{
// variants[] is setup such that type can be determined via modulo 2.
- mdata->query_type = (i % 2) == 0 ? NM_QUERY_TYPE_THREADS : NM_QUERY_TYPE_MESGS;
+ mdata->query_type = ((i % 2) == 0) ? NM_QUERY_TYPE_THREADS : NM_QUERY_TYPE_MESGS;
mutt_str_remall_strcasestr(buf, variants[i]);
}
if (wc == wc1)
{
- special |= (wc == '_' && special & A_UNDERLINE) ? A_UNDERLINE : A_BOLD;
+ special |= ((wc == '_') && (special & A_UNDERLINE)) ? A_UNDERLINE : A_BOLD;
}
else if ((wc == '_') || (wc1 == '_'))
{
if (IsEmail(rd->extra) && C_PagerIndexLines)
{
memcpy(rd->index_window, MuttIndexWindow, sizeof(struct MuttWindow));
- rd->index_window->rows = rd->indexlen > 0 ? rd->indexlen - 1 : 0;
+ rd->index_window->rows = (rd->indexlen > 0) ? rd->indexlen - 1 : 0;
if (C_StatusOnTop)
{
size_t l1 = rd->pager_status_window->cols * MB_LEN_MAX;
size_t l2 = sizeof(buf);
hfi.email = (IsEmail(rd->extra)) ? rd->extra->email : rd->extra->body->email;
- mutt_make_string_info(buf, l1 < l2 ? l1 : l2, rd->pager_status_window->cols,
+ mutt_make_string_info(buf, (l1 < l2) ? l1 : l2, rd->pager_status_window->cols,
NONULL(C_PagerFormat), &hfi, 0);
mutt_draw_statusline(rd->pager_status_window->cols, buf, l2);
}
CHECK_ATTACH;
SendFlags replyflags =
- SEND_REPLY | (ch == OP_GROUP_REPLY ? SEND_GROUP_REPLY : 0) |
- (ch == OP_GROUP_CHAT_REPLY ? SEND_GROUP_CHAT_REPLY : 0) |
- (ch == OP_LIST_REPLY ? SEND_LIST_REPLY : 0);
+ SEND_REPLY | ((ch == OP_GROUP_REPLY) ? SEND_GROUP_REPLY : 0) |
+ ((ch == OP_GROUP_CHAT_REPLY) ? SEND_GROUP_CHAT_REPLY : 0) |
+ ((ch == OP_LIST_REPLY) ? SEND_LIST_REPLY : 0);
if (IsMsgAttach(extra))
mutt_attach_reply(extra->fp, extra->email, extra->actx, extra->body, replyflags);
OptSearchInvalid = false;
}
- int incr = (OptSearchReverse) ? -1 : 1;
+ int incr = OptSearchReverse ? -1 : 1;
if (op == OP_SEARCH_OPPOSITE)
incr = -incr;
snprintf(buf, sizeof(buf), "PASS %s\r\n", adata->conn->account.pass);
ret = pop_query_d(adata, buf, sizeof(buf),
/* don't print the password unless we're at the ungodly debugging level */
- C_DebugLevel < MUTT_SOCK_LOG_FULL ? "PASS *\r\n" : NULL);
+ (C_DebugLevel < MUTT_SOCK_LOG_FULL) ? "PASS *\r\n" : NULL);
}
switch (ret)
{
snprintf(fmt, sizeof(fmt), "%%%sc", prec);
snprintf(buf, buflen, fmt,
- aptr->content->type != TYPE_TEXT || aptr->content->noconv ? 'n' : 'c');
+ ((aptr->content->type != TYPE_TEXT) || aptr->content->noconv) ? 'n' : 'c');
}
else if ((aptr->content->type != TYPE_TEXT) || aptr->content->noconv)
optional = 0;
{
CHECK_ATTACH;
- SendFlags flags = SEND_REPLY | (op == OP_GROUP_REPLY ? SEND_GROUP_REPLY : 0) |
- (op == OP_GROUP_CHAT_REPLY ? SEND_GROUP_CHAT_REPLY : 0) |
- (op == OP_LIST_REPLY ? SEND_LIST_REPLY : 0);
+ SendFlags flags = SEND_REPLY | ((op == OP_GROUP_REPLY) ? SEND_GROUP_REPLY : 0) |
+ ((op == OP_GROUP_CHAT_REPLY) ? SEND_GROUP_CHAT_REPLY : 0) |
+ ((op == OP_LIST_REPLY) ? SEND_LIST_REPLY : 0);
mutt_attach_reply(CURATTACH->fp, e, actx,
menu->tagprefix ? NULL : CURATTACH->content, flags);
menu->redraw = REDRAW_FULL;
rmatch = true;
for (j = mutt_str_strlen(oldfile) - 1, k = mutt_str_strlen(nametemplate) - 1;
- j >= (lmatch ? i : 0) && k >= i + 2; j--, k--)
+ (j >= (lmatch ? i : 0)) && (k >= (i + 2)); j--, k--)
{
if (nametemplate[k] != oldfile[j])
{
if (!OptNoCurses && !(flags & SEND_MAILX))
{
- mutt_message(i != 0 ? _("Sending in background") :
- (flags & SEND_NEWS) ? _("Article posted") : /* USE_NNTP */
- _("Mail sent"));
+ mutt_message((i != 0) ? _("Sending in background") :
+ (flags & SEND_NEWS) ? _("Article posted") : /* USE_NNTP */
+ _("Mail sent"));
#ifdef USE_NOTMUCH
if (C_NmRecord)
nm_record_message(ctx ? ctx->mailbox : NULL, finalpath, cur);
if (tag && *tag && (fprintf(fp, "%s%s: ", NONULL(pfx), tag) < 0))
return -1;
- col = mutt_str_strlen(tag) + (tag && *tag ? 2 : 0) + mutt_str_strlen(pfx);
+ col = mutt_str_strlen(tag) + ((tag && *tag) ? 2 : 0) + mutt_str_strlen(pfx);
while (p && *p)
{
fprintf(fp, "User-Agent: NeoMutt/%s%s\n", PACKAGE_VERSION, GitVer);
}
- return ferror(fp) == 0 ? 0 : -1;
+ return (ferror(fp) == 0) ? 0 : -1;
}
/**
}
else
{
- st = (C_SendmailWait > 0 && errno == EINTR && SigAlrm) ? S_BKG : S_ERR;
+ st = ((C_SendmailWait > 0) && (errno == EINTR) && SigAlrm) ? S_BKG : S_ERR;
if ((C_SendmailWait > 0) && tempfile && *tempfile)
{
unlink(*tempfile);
(strtod((*ppa)->env->spam->data, &aptr) - strtod((*ppb)->env->spam->data, &bptr));
/* map double into comparison (-1, 0, or 1) */
- result = (difference < 0.0 ? -1 : difference > 0.0 ? 1 : 0);
+ result = ((difference < 0.0) ? -1 : (difference > 0.0) ? 1 : 0);
/* If either aptr or bptr is equal to data, there is no numeric */
/* value for that spam attribute. In this case, compare lexically. */