lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 11 Oct 2006 12:48:28 -0700
From:	Randy Dunlap <rdunlap@...otime.net>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	LKML <linux-kernel@...r.kernel.org>, linux-net@...r.kernel.org
Subject: Re: funny looking equation

On Wed, 11 Oct 2006 15:40:55 -0400 Steven Rostedt wrote:

> I was just testing some of my parsing code on all the .c and .h files in
> the Linux kernel, and I came up with this little equation:
> 
> from 2.6.18 drivers/atm/eni.c:1272
> 
> 
> ---
>                         int div;
> 
>                         if (!*pcr) *pcr = eni_dev->tx_bw+reserved;
>                         for (*pre = 3; *pre >= 0; (*pre)--)
>                                 if (TS_CLOCK/pre_div[*pre]/64 > -*pcr) break;
>                         if (*pre < 3) (*pre)++; /* else fail later */
>                         div = pre_div[*pre]*-*pcr;
>                                     ^^^^^^^^^^^^^
>     This could really do with some spaces and a couple of parenthesis.
> 
>                         DPRINTK("max div %d\n",div);
>                         *res = (TS_CLOCK+div-1)/div-1;
> ---
> 
> 
> Oh well, this isn't a bug.  Just something that someone might want to
> clean up the next time they touch that code.

and break the if-lines into kernel style.

---
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ