From 478347642ccabf7399eb16c131f5469433948bea Mon Sep 17 00:00:00 2001 From: mrg Date: Sun, 22 Oct 2006 08:29:36 +0000 Subject: [PATCH] avoid assigning a void * to an int just to see if it is non-zero or not. use %zu to print a size_t. --- usr.bin/mail/mime_codecs.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/usr.bin/mail/mime_codecs.c b/usr.bin/mail/mime_codecs.c index 36db57089fac..cfe67563c323 100644 --- a/usr.bin/mail/mime_codecs.c +++ b/usr.bin/mail/mime_codecs.c @@ -1,4 +1,4 @@ -/* $NetBSD: mime_codecs.c,v 1.1 2006/10/21 21:37:21 christos Exp $ */ +/* $NetBSD: mime_codecs.c,v 1.2 2006/10/22 08:29:36 mrg Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ #include #ifndef __lint__ -__RCSID("$NetBSD: mime_codecs.c,v 1.1 2006/10/21 21:37:21 christos Exp $"); +__RCSID("$NetBSD: mime_codecs.c,v 1.2 2006/10/22 08:29:36 mrg Exp $"); #endif /* not __lint__ */ #include @@ -350,8 +350,6 @@ mime_fB64_decode(FILE *fi, FILE *fo, void *cookie) size_t len; char *buf; size_t buflen; - int add_lf; - add_lf = (int)cookie; buflen = 3 * (MIME_BASE64_LINE_MAX / 4); buf = emalloc(buflen); @@ -388,7 +386,7 @@ mime_fB64_decode(FILE *fi, FILE *fo, void *cookie) free(buf); - if (add_lf) + if (cookie) (void)fputc('\n', fo); } @@ -443,7 +441,7 @@ mustquote(unsigned char *p, unsigned char *end, size_t l) if (flag == XD) /* line may consist of a single dot */ return (p + 1 < end && p[1] == '\n'); - errx(EXIT_FAILURE, "mustquote: invalid logic: *p=0x%x (%d) flag=%d, l=%d\n", + errx(EXIT_FAILURE, "mustquote: invalid logic: *p=0x%x (%d) flag=%d, l=%zu\n", *p, *p, flag, l); /* NOT REACHED */ return 0; /* appease GCC */