MuttVars of those types are set via safe_strdup(), which returns NULL
if the original is "". Thus Var implies *Var.
A good portion of the code relies on that axiom, but over the years
some (Var && *Var) checks have crept in, including from me.
This was partially because of the INITVAL("") that were in the code,
which implied (incorrectly) the initial value could be "". Commit
2f91d43e removed those to make it more clear.
This commit removes the *Var checks to make it even clearer, and help
avoid them creeping back in again.
Co-authored-by: Richard Russon <rich@flatcap.org>
if (!C_Charset || !pd || !*pd)
return;
- if (!charsets || !*charsets)
+ if (!charsets)
charsets = "utf-8";
char *e = NULL;
const char *c = C_AssumedCharset;
const char *c1 = NULL;
- if (c && *c)
+ if (c)
{
c1 = strchr(c, ':');
mutt_str_strfcpy(fcharset, c, c1 ? (c1 - c + 1) : sizeof(fcharset));
}
}
- if (!oppenc_mode && self_encrypt && *self_encrypt)
+ if (!oppenc_mode && self_encrypt)
{
const size_t keylist_size = mutt_str_strlen(*keylist);
mutt_mem_realloc(keylist, keylist_size + mutt_str_strlen(self_encrypt) + 2);
encrypt_as = C_PgpDefaultKey;
else if (((WithCrypto & APPLICATION_SMIME) != 0) && (e_post->security & APPLICATION_SMIME))
encrypt_as = C_SmimeDefaultKey;
- if (!(encrypt_as && *encrypt_as))
+ if (!encrypt_as)
encrypt_as = C_PostponeEncryptAs;
- if (encrypt_as && *encrypt_as)
+ if (encrypt_as)
{
bool is_signed = (e_post->security & SEC_SIGN);
if (is_signed)