Re: [patch] printk: remove some dead code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2012-07-03 at 20:43 +0200, walter harms wrote:
> >  		} else {
> >  			len += 3;
> > -			if (msg->level > 9)
> > +			if (prefix > 9)
> >  				len++;
> > -			if (msg->level > 99)
> > +			if (prefix > 99)
> >  				len++;
> >  		}
> >  	}
> > 
> > 
> 
> just for my curiosity: why not len+=5 and forget the rest ?

It's a possibly multi-digit decimal number, and the length should be
actual length not the maximum.

Kay

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux