break;
case 'd':
- if (folder->ff->nd->desc != NULL)
+ if (folder->ff->nd->desc)
{
char *buf = safe_strdup(folder->ff->nd->desc);
if (NewsgroupsCharset && *NewsgroupsCharset)
new = (struct AttachPtr *) safe_calloc(1, sizeof(struct AttachPtr));
new->unowned = 1;
new->content = mutt_make_file_attach(att);
- if (new->content != NULL)
+ if (new->content)
update_idx(menu, actx, new);
else
{
{
new = (struct AttachPtr *) safe_calloc(1, sizeof(struct AttachPtr));
new->content = mutt_make_message_attach(Context, h, 1);
- if (new->content != NULL)
+ if (new->content)
update_idx(menu, actx, new);
else
{
if (flags & CH_UPDATE_LABEL)
{
h->xlabel_changed = false;
- if (h->env->x_label != NULL)
+ if (h->env->x_label)
if (fprintf(out, "X-Label: %s\n", h->env->x_label) != 10 + strlen(h->env->x_label))
return -1;
}
if (mutt_strcmp(hdr->env->x_label, new) == 0)
return 0;
- if (hdr->env->x_label != NULL)
+ if (hdr->env->x_label)
label_ref_dec(ctx, hdr->env->x_label);
mutt_str_replace(&hdr->env->x_label, new);
- if (hdr->env->x_label != NULL)
+ if (hdr->env->x_label)
label_ref_inc(ctx, hdr->env->x_label);
return hdr->changed = hdr->xlabel_changed = true;
}
snprintf(newdir, ndlen, "%s/%s", parent, ".muttXXXXXX");
- if (mkdtemp(newdir) == NULL)
+ if (!mkdtemp(newdir))
{
mutt_debug(1, "mkwrapdir: mkdtemp() failed\n");
return -1;
void *p = NULL;
if (size == 0)
- return 0;
+ return NULL;
p = malloc(size);
- if (p == NULL)
+ if (!p)
{
mutt_error(_("Out of memory!"));
sleep(1);
its own SIGWINCH handler */
mutt_signal_init();
#endif
- if (initscr() == NULL)
+ if (!initscr())
{
puts(_("Error initializing terminal."));
exit(1);
*/
for (j = i; j < old_msgcount; j++)
{
- if (old_hdrs[j] == NULL)
+ if (!old_hdrs[j])
continue;
if (cmp_headers(ctx->hdrs[i], old_hdrs[j]))
{
{
for (j = 0; j < i && j < old_msgcount; j++)
{
- if (old_hdrs[j] == NULL)
+ if (!old_hdrs[j])
continue;
if (cmp_headers(ctx->hdrs[i], old_hdrs[j]))
{
static bool _lua_init(lua_State **l)
{
- if (*l == NULL)
+ if (!*l)
{
mutt_debug(2, " * lua_init()\n");
*l = luaL_newstate();
- if (*l == NULL)
+ if (!*l)
{
mutt_error("Error: Couldn't load the lua interpreter.");
return false;
{
/* not much point in classifying quotes... */
- if (*quote_list == NULL)
+ if (!*quote_list)
{
class = safe_calloc(1, sizeof(struct QClass));
class->color = ColorQuote[0];