diff options
| author | hathach <[email protected]> | 2025-09-15 16:45:41 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-09-15 16:45:41 +0700 |
| commit | 8e34ba9cf6bdcabe2c9eb73ae1aafec38d0ec46d (patch) | |
| tree | 58c2426146aa5d413706a62521ab6e2cb740b170 /src/common/tusb_debug.h | |
| parent | 802819d271314298ea5a786a37ec6a1e65ef31d6 (diff) | |
| parent | feef534921446e1a3ded54a0c46191fe1709bdb4 (diff) | |
Merge branch 'master' into fork/ennebi/mtp
Diffstat (limited to 'src/common/tusb_debug.h')
| -rw-r--r-- | src/common/tusb_debug.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/common/tusb_debug.h b/src/common/tusb_debug.h index 2e9f1d9cd..1d0c6f1ad 100644 --- a/src/common/tusb_debug.h +++ b/src/common/tusb_debug.h @@ -108,15 +108,13 @@ typedef struct { } tu_lookup_table_t; static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint32_t key) { - tu_static char not_found[11]; - for(uint16_t i=0; i<p_table->count; i++) { - if (p_table->items[i].key == key) return p_table->items[i].data; + if (p_table->items[i].key == key) { return p_table->items[i].data; } } // not found return the key value in hex + static char not_found[11]; snprintf(not_found, sizeof(not_found), "0x%08lX", (unsigned long) key); - return not_found; } |
