]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
vsprintf: reduce code size by avoiding extra check
authorAndré Goddard Rosa <andre.goddard@gmail.com>
Tue, 15 Dec 2009 02:00:59 +0000 (18:00 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Dec 2009 16:53:32 +0000 (08:53 -0800)
commitb5ff992b09dbe06a4a020fbb702e29ab61290cc5
treeb23916d07465dc4a2dbd011d2497491e5e217e5d
parent08562cb27da6a1472be15898173105b46801a73b
vsprintf: reduce code size by avoiding extra check

No functional change, just refactor the code so that it avoid checking
"if (hi)" two times in a sequence, taking advantage of previous check made.

It also reduces code size:
   text    data     bss     dec     hex filename
  15726       0       8   15734    3d76 vsprintf.o (ex lib/lib.a-BEFORE)
  15710       0       8   15718    3d66 vsprintf.o (ex lib/lib.a-AFTER)

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/vsprintf.c