lkml.org 
[lkml]   [2013]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -v1.1] x86, boot: Further compress CPUs bootup message

* Borislav Petkov <bp@alien8.de> wrote:

> On Sat, Sep 28, 2013 at 09:49:27PM +0200, Borislav Petkov wrote:
> > And yes, that one works too.
>
> Btw, just to be thorough, we could handle negative numbers too:
>
> int num_digits(int val)
> {
> int m = 10;
> int d = 1;
>
> if (val < 0)
> val = -val;
>
> while (val >= m) {
> m *= 10;
> d++;
> }
>
> return d;
> }

I like the cell phone version better!

Thanks,

Ingo


\
 
 \ /
  Last update: 2013-09-28 22:21    [W:1.808 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site