diff options
author | Kevin McCarthy <kevin@8t8.us> | 2019-06-27 15:35:12 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2019-06-28 12:44:02 -0700 |
commit | 8768e10f85337400d952890c70ca3468c09507ec (patch) | |
tree | d25d51d8a47eb892b60e6116baa265f7697383ca /init.c | |
parent | 4c728278f5ceb6b9ecf6cec7cf637475e77b4089 (diff) |
Remove unnecessary "" checks for DT_STR and DT_PATH MuttVars.
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.
Diffstat (limited to 'init.c')
-rw-r--r-- | init.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2719,7 +2719,7 @@ static int source_rc (const char *rcfile, BUFFER *err) mutt_buffer_init (&token); while ((linebuf = mutt_read_line (linebuf, &buflen, f, &line, MUTT_CONT)) != NULL) { - conv=ConfigCharset && (*ConfigCharset) && Charset; + conv=ConfigCharset && Charset; if (conv) { currentline=safe_strdup(linebuf); |