From bfc1e882855d728e2ebb61f2a23fd67cf68ae977 Mon Sep 17 00:00:00 2001 From: Brendan Cully Date: Sun, 4 Jan 2009 13:21:14 -0800 Subject: [PATCH] Use ! instead of testing pointers against 0. Closes #3125. --- parse.c | 8 ++++---- snprintf.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/parse.c b/parse.c index 17b24ca12..143a62e92 100644 --- a/parse.c +++ b/parse.c @@ -296,12 +296,12 @@ void mutt_parse_content_type (char *s, BODY *ct) /* Some pre-RFC1521 gateways still use the "name=filename" convention, * but if a filename has already been set in the content-disposition, * let that take precedence, and don't set it here */ - if ((pc = mutt_get_parameter( "name", ct->parameter)) != 0 && !ct->filename) + if ((pc = mutt_get_parameter( "name", ct->parameter)) && !ct->filename) ct->filename = safe_strdup(pc); #ifdef SUN_ATTACHMENT /* this is deep and utter perversion */ - if ((pc = mutt_get_parameter ("conversions", ct->parameter)) != 0) + if ((pc = mutt_get_parameter ("conversions", ct->parameter))) ct->encoding = mutt_check_encoding (pc); #endif @@ -380,9 +380,9 @@ static void parse_content_disposition (char *s, BODY *ct) { s++; SKIPWS (s); - if ((s = mutt_get_parameter ("filename", (parms = parse_parameters (s)))) != 0) + if ((s = mutt_get_parameter ("filename", (parms = parse_parameters (s))))) mutt_str_replace (&ct->filename, s); - if ((s = mutt_get_parameter ("name", parms)) != 0) + if ((s = mutt_get_parameter ("name", parms))) ct->form_name = safe_strdup (s); mutt_free_parameter (&parms); } diff --git a/snprintf.c b/snprintf.c index cd84b74b3..827b362cf 100644 --- a/snprintf.c +++ b/snprintf.c @@ -406,7 +406,7 @@ static void fmtstr (char *buffer, size_t *currlen, size_t maxlen, int padlen, strln; /* amount to pad */ int cnt = 0; - if (value == 0) + if (!value) { value = ""; } -- 2.40.0