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] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTim395uq5kwPxwY111sXRGgmZ=w6jAfkeHwVDtRC@mail.gmail.com>
Date:	Mon, 2 Aug 2010 15:00:12 -0300
From:	Thiago Farina <tfransosi@...il.com>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Cyrill Gorcunov <gorcunov@...nvz.org>,
	Pekka Enberg <penberg@...helsinki.fi>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] x86, setup: reorgize the early_console_setup

On Mon, Aug 2, 2010 at 2:56 PM, Thiago Farina <tfransosi@...il.com> wrote:
> On Mon, Aug 2, 2010 at 4:13 AM, Yinghai Lu <yinghai@...nel.org> wrote:
>> Index: linux-2.6/arch/x86/boot/string.c
>> ===================================================================
>> --- linux-2.6.orig/arch/x86/boot/string.c
>> +++ linux-2.6/arch/x86/boot/string.c
>> @@ -12,7 +12,21 @@
>>  * Very basic string functions
>>  */
>>
>> -#include "boot.h"
>> +static inline int isdigit(int ch)
>> +{
>> +       return (ch >= '0') && (ch <= '9');
>> +}
>> +
>> +static inline int isxdigit(int ch)
>> +{
>> +       if (isdigit(ch))
>> +               return true;
>> +
>> +       if ((ch >= 'a') && (ch <= 'f'))
>> +               return true;
>> +
>> +       return (ch >= 'A') && (ch <= 'F');
>> +}
>>
>
> These to functions above can be fairly simplified by writting as:
>
> static bool inline is_hex_digit(int c) {
>  return (c >= '0' && c <= '9') ||
>            (c >= 'A' && c <= 'F') ||
>            (c >= 'a' && c <= 'f');
> }
>

Wow, sorry, this should be:

static inline bool is_hex_digit(int c) { ... }
--
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