Re: [PATCH] hex <-> int conversion routines.

From: Martin Dalecki (dalecki@evision-ventures.com)
Date: Wed Feb 20 2002 - 05:25:13 EST


>>>+static __inline__ char inthex_nibble(int x)
>>>+{
>>>+ const char* digits = "0123456789abcdef";
>>>+
>>>+ return digits[x & 0x0f];
>>>+}
>>>
>>perhaps better do static const char *digits.
>>
> GCC doesn't copy const strings, as opposed to other const arrays.
Currently.

> So it should be fine as it is. GCC also reuse duplicated strings.

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



This archive was generated by hypermail 2b29 : Sat Feb 23 2002 - 21:00:23 EST