summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2025-05-15 21:40:36 +0200
committerHiFiPhile <[email protected]>2025-05-15 21:40:36 +0200
commit6346fbec16739d91fc9ece57216d40ca1c091936 (patch)
tree926f109a7cb85c03ff9e6a8fbae7c32df3496a5d /src/common
parent9645baa42ed3d50d650b9f2905a91d01b0a7a944 (diff)
parent9548d51c7ec3a2c8d42058e366561f7552cf1c1d (diff)
Merge branch 'master' into h7rs
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_debug.h6
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;
}