lkml.org 
[lkml]   [2010]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/12] isdn: remove ishexdigit() in regard to isxdigit()
Am 18.02.2010 19:55 schrieb Andy Shevchenko:
> From: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
>
> Samll cleanup in drivers/isdn/gigaset/capi.c where own implementation of
> isxdigit() has been changed to kernel native one.
>
> Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>

Acked-by: Tilman Schmidt <tilman@imap.cc>

Thanks,
Tilman

> ---
> drivers/isdn/gigaset/capi.c | 16 +---------------
> 1 files changed, 1 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c
> index 3f5cd06..83c4e2f 100644
> --- a/drivers/isdn/gigaset/capi.c
> +++ b/drivers/isdn/gigaset/capi.c
> @@ -169,20 +169,6 @@ static inline void ignore_cstruct_param(struct cardstate *cs, _cstruct param,
> }
>
> /*
> - * check for legal hex digit
> - */
> -static inline int ishexdigit(char c)
> -{
> - if (c >= '0' && c <= '9')
> - return 1;
> - if (c >= 'A' && c <= 'F')
> - return 1;
> - if (c >= 'a' && c <= 'f')
> - return 1;
> - return 0;
> -}
> -
> -/*
> * convert hex to binary
> */
> static inline u8 hex2bin(char c)
> @@ -202,7 +188,7 @@ static int encode_ie(char *in, u8 *out, int maxlen)
> {
> int l = 0;
> while (*in) {
> - if (!ishexdigit(in[0]) || !ishexdigit(in[1]) || l >= maxlen)
> + if (!isxdigit(in[0]) || !isxdigit(in[1]) || l >= maxlen)
> return -1;
> out[++l] = (hex2bin(in[0]) << 4) + hex2bin(in[1]);
> in += 2;

--
Tilman Schmidt E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2010-02-19 00:39    [W:0.107 / U:0.244 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site