From owner-freebsd-audit Sun Jun 2 6:58:36 2002 Delivered-To: freebsd-audit@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id E454837B406 for ; Sun, 2 Jun 2002 06:58:32 -0700 (PDT) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 725835307; Sun, 2 Jun 2002 15:58:31 +0200 (CEST) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Bruce Evans Cc: Dima Dorfman , Subject: Re: %j for printf(9) References: <20020601233017.Q2458-100000@gamplex.bde.org> From: Dag-Erling Smorgrav Date: 02 Jun 2002 15:58:30 +0200 In-Reply-To: <20020601233017.Q2458-100000@gamplex.bde.org> Message-ID: Lines: 41 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bruce Evans writes: > When splitting this, you might consider fixing he disorder in it (but fixing > the external disorder and misarrangement of the other declarations of ints > should be in a separate patch). Removed > Unrelated style fix :-). Removed > Another unrelated style fix. This one makes the patch harder to read. Removed > Please remove the 'n' case, and check this a bit. I forgot to remove it > soon after rev.1.48. Done. It wasn't used anywhere in the kernel. I also took the liberty of implementing the "real" %n: case 'n': if (jflag) *(va_arg(ap, intmax_t *)) = retval; else if (qflag) *(va_arg(ap, quad_t *)) = retval; else if (lflag) *(va_arg(ap, long *)) = retval; else *(va_arg(ap, int *)) = retval; break; > This seems to print all the garbage for %. It might be useful > to mark up the garbage. But gcc will detect the garbage at compile time > for literal strings. The original code would print different, possibly incorrect garbage. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message