On Fri, Jul 1, 2011 at 2:43 PM, Mike Frysinger <[email protected]> wrote:
> On Wed, Jun 29, 2011 at 13:42, Jie Zhang wrote:
>> I think on most modern machines, HOST_CHARSET will be defined to
>> HOST_CHARSET_ASCII. So the const lookup table will be used.
>
> as long as that's true, i'm fine with it
>
> so could you merge the ice_hex_init() logic into this hex_init() logic
> and commit the result ?  seems that the stapl code too wants to do hex
> conversion, so might as well merge this now and not wait for ice100b
> firmware.

I have committed it and a small patch to do the merge, which is attached.


Jie
  * src/lib/hex.c (hex_init): Avoid redundant initialization.

Index: src/lib/hex.c
===================================================================
--- src/lib/hex.c.orig	2011-07-01 14:20:54.000000000 -0400
+++ src/lib/hex.c	2011-07-01 14:21:43.000000000 -0400
@@ -159,8 +159,14 @@
 hex_init (void)
 {
 #ifndef HEX_TABLE_INITIALIZED
+  static bool inited;
   int i;
 
+  if (inited)
+    return;
+
+  inited = true;
+
   for (i=0; i<_hex_array_size; i++)
     {
       switch (i)
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development

Reply via email to