From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH for-4.5 1/2] xen/vsprintf: Introduce %*ph extended format specifier for hex buffers Date: Fri, 26 Sep 2014 12:57:34 +0100 Message-ID: <542570CE02000078000399BA@mail.emea.novell.com> References: <1411726207-2689-1-git-send-email-andrew.cooper3@citrix.com> <1411726207-2689-2-git-send-email-andrew.cooper3@citrix.com> <20140926114925.GA35563@deinos.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140926114925.GA35563@deinos.phlegethon.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , Tim Deegan Cc: Keir Fraser , Xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 26.09.14 at 13:49, wrote: > At 11:10 +0100 on 26 Sep (1411726206), Andrew Cooper wrote: >> + for ( i = 0; i < nr_bytes; ++i ) >> + { >> + /* Each byte: 2 chars, 0-padded, base 16, no hex prefix. */ >> + str = number(str, end, hex_buffer[i], 16, 2, -1, ZEROPAD); >> + if ( str < end ) > > (str < end && i + 1 < nr_bytes) to avoid a trailing space? Not exactly, as the increment of str must then also be suppressed. Jan