#ifdef USE_NNTP
if (OptNews)
{
- if (mutt_b2s(file)[0] != '\0')
- mutt_buffer_strcpy(prefix, mutt_b2s(file));
- else
+ if (mutt_buffer_is_empty(file))
{
struct NntpAccountData *adata = CurrentNewsSrv;
}
}
}
+ else
+ {
+ mutt_buffer_strcpy(prefix, mutt_b2s(file));
+ }
}
else
#endif
- if (mutt_b2s(file)[0] != '\0')
+ if (!mutt_buffer_is_empty(file))
{
mutt_buffer_expand_path(file);
#ifdef USE_IMAP
* meaning only with sort methods SUBJECT/DESC for now. */
if (CurrentFolder)
{
- if (mutt_b2s(&LastDir)[0] == '\0')
+ if (mutt_buffer_is_empty(&LastDir))
{
/* If browsing in "local"-mode, than we chose to define LastDir to
* MailDir */
while ((i > 0) && (mutt_b2s(&LastDir)[--i] == '/'))
LastDir.data[i] = '\0';
mutt_buffer_fix_dptr(&LastDir);
- if (mutt_b2s(&LastDir)[0] == '\0')
+ if (mutt_buffer_is_empty(&LastDir))
mutt_path_getcwd(&LastDir);
}
}
}
*files = tfiles;
}
- else if (mutt_b2s(file)[0] != '\0') /* no tagged entries. return selected entry */
+ else if (!mutt_buffer_is_empty(file)) /* no tagged entries. return selected entry */
{
*numfiles = 1;
tfiles = mutt_mem_calloc(*numfiles, sizeof(char *));
else if (op == OP_GOTO_PARENT)
mutt_get_parent_path(mutt_b2s(buf), buf->data, buf->dsize);
- if (mutt_b2s(buf)[0] != '\0')
+ if (!mutt_buffer_is_empty(buf))
{
mailbox = false;
mutt_buffer_expand_path(buf);
mailbox = false;
/* assume that the user wants to see everything */
- if (mutt_b2s(buf)[0] == '\0')
+ if (mutt_buffer_is_empty(buf))
mutt_buffer_strcpy(buf, ".");
struct Buffer errmsg = { 0 };
if (!entry || !entry->xneomuttkeep)
{
- if (fp && mutt_b2s(tmpfile)[0])
+ if (fp && !mutt_buffer_is_empty(tmpfile))
{
/* add temporary file to TempAttachmentsList to be deleted on timeout hook */
mutt_add_temp_attachment(mutt_b2s(tmpfile));
mailcap_entry_free(&entry);
- if (mutt_b2s(pagerfile)[0] != '\0')
+ if (!mutt_buffer_is_empty(pagerfile))
mutt_file_unlink(mutt_b2s(pagerfile));
mutt_buffer_pool_release(&tmpfile);