All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] change throughput display units with fast links
Date: Wed, 14 Oct 2009 09:07:41 +0200	[thread overview]
Message-ID: <4AD578BD.7080201@viscovery.net> (raw)
In-Reply-To: <alpine.LFD.2.00.0910132256280.20122@xanadu.home>

Nicolas Pitre schrieb:
> +	if (rate > 1 << 10) {
> +		int x = rate + 5;  /* for rounding */
> +		snprintf(tp->display + sizeof(tp->display) - l, l,
> +			 " | %u.%2.2u MiB/s",

Shouldn't the fractional part be "%02.2u" (leading zeros instead of blanks)?

> +			 x >> 10, ((x & ((1 << 10) - 1)) * 100) >> 10);
> +	} else if (rate)
>  		snprintf(tp->display + sizeof(tp->display) - l, l,
>  			 " | %u KiB/s", rate);
>  }

-- Hannes

  reply	other threads:[~2009-10-14  7:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-14  3:02 [PATCH] change throughput display units with fast links Nicolas Pitre
2009-10-14  7:07 ` Johannes Sixt [this message]
2009-10-14  9:13   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AD578BD.7080201@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=nico@fluxnic.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.