#define hexval(c) IndexHex[(unsigned int) (c)]
-#define is_multipart(x) \
- ((x)->type == TYPEMULTIPART || \
- ((x)->type == TYPEMESSAGE && ((strcasecmp((x)->subtype, "rfc822") == 0) || \
- (strcasecmp((x)->subtype, "news") == 0))))
+#define is_multipart(x) \
+ (((x)->type == TYPEMULTIPART) || (((x)->type == TYPEMESSAGE) && ((x)->subtype) && \
+ ((strcasecmp((x)->subtype, "rfc822") == 0) || \
+ (strcasecmp((x)->subtype, "news") == 0))))
#define TYPE(X) \
((X->type == TYPEOTHER) && (X->xtype != NULL) ? X->xtype : BodyTypes[(X->type)])
size_t bufpos, buflen;
char *u = NULL, *t0 = NULL, *t1 = NULL, *t = NULL;
char *s0 = NULL, *s1 = NULL;
- size_t ulen, r, n, wlen;
+ size_t ulen, r, n, wlen = 0;
encoder_t encoder;
char *tocode1 = NULL;
const char *tocode = NULL;
if (gpg_err_code(err) == GPG_ERR_NO_DATA)
{
/* Decrypt verify can't handle signed only messages. */
- err = (gpgme_data_seek(armored_data, 0, SEEK_SET) == -1) ?
- gpgme_error_from_errno(errno) :
- 0;
+ gpgme_data_seek(armored_data, 0, SEEK_SET);
/* Must release plaintext so that we supply an
uninitialized object. */
gpgme_data_release(plaintext);
void mutt_print_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, struct Body *top)
{
- struct State state;
+ struct State state = { 0 };
pid_t thepid;
if (query_quadoption(Print,
if (!can_print(actx, top, tag))
return;
mutt_endwin(NULL);
- memset(&state, 0, sizeof(struct State));
thepid = mutt_create_filter(NONULL(PrintCommand), &state.fpout, NULL, NULL);
print_attachment_list(actx, fp, tag, top, &state);
mutt_file_fclose(&state.fpout);
mutt_debug(4, "f=f: line [%s], width = %ld, spaces = %lu\n", line,
(long) width, fst->spaces);
- for (p = (char *) line, words = 0; (p = strsep(&line, " ")) != NULL;)
+ for (words = 0; (p = strsep(&line, " "));)
{
mutt_debug(4, "f=f: word [%s], width: %lu, remaining = [%s]\n", p, fst->width, line);