aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-08-21 19:12:19 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-08-21 19:12:19 +0200
commit6948b408a292db316e86d777e574891ff5cedbfa (patch)
treee7c3bd4b54fb2a039d139cfecdf70ce45e628042
parentd65041c3866ecd00c61839591009fb105078145d (diff)
downloadmblaze-6948b408a292db316e86d777e574891ff5cedbfa.tar.gz
mflow: use blaze822_mime_parameter properly
Found using spam corpus at http://untroubled.org/spam/2017-08.7z.
-rw-r--r--mflow.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mflow.c b/mflow.c
index 56af515..3a465b7 100644
--- a/mflow.c
+++ b/mflow.c
@@ -105,10 +105,10 @@ main()
char *ct = getenv("PIPE_CONTENTTYPE");
if (ct) {
char *s, *se;
- blaze822_mime_parameter(ct, "format", &s, &se);
- reflow = s && (strncasecmp(s, "flowed", 6) == 0);
- blaze822_mime_parameter(ct, "delsp", &s, &se);
- delsp = s && (strncasecmp(s, "yes", 3) == 0);
+ if (blaze822_mime_parameter(ct, "format", &s, &se) && s)
+ reflow = (strncasecmp(s, "flowed", 6) == 0);
+ if (blaze822_mime_parameter(ct, "delsp", &s, &se) && s)
+ delsp = (strncasecmp(s, "yes", 3) == 0);
}
char *cols = getenv("COLUMNS");