Diff between 2ba6148139718a6eb38f14290d04a960c170b8a3 and acaf8f866d2906cfb229aa4d8cab599ac8cb7316

Changed Files

File Additions Deletions Status
src/shared/bap-debug.c +3 -3 modified
src/shared/util.c +5 -5 modified
src/shared/util.h +1 -1 modified

Full Patch

diff --git a/src/shared/bap-debug.c b/src/shared/bap-debug.c
index 62bcde9..495a22c 100644
--- a/src/shared/bap-debug.c
+++ b/src/shared/bap-debug.c
@@ -184,7 +184,7 @@ done:
 					user_data);
 }
 
-struct util_ltv_debugger pac_cap_table[] = {
+static const struct util_ltv_debugger pac_cap_table[] = {
 	UTIL_LTV_DEBUG(0x01, pac_debug_freq),
 	UTIL_LTV_DEBUG(0x02, pac_debug_duration),
 	UTIL_LTV_DEBUG(0x03, pac_debug_channels),
@@ -413,7 +413,7 @@ done:
 				user_data);
 }
 
-struct util_ltv_debugger ase_cc_table[] = {
+static const struct util_ltv_debugger ase_cc_table[] = {
 	UTIL_LTV_DEBUG(0x01, ase_debug_freq),
 	UTIL_LTV_DEBUG(0x02, ase_debug_duration),
 	UTIL_LTV_DEBUG(0x03, ase_debug_location),
@@ -527,7 +527,7 @@ done:
 				user_data);
 }
 
-struct util_ltv_debugger ase_metadata_table[] = {
+static const struct util_ltv_debugger ase_metadata_table[] = {
 	UTIL_LTV_DEBUG(0x01, ase_debug_preferred_context),
 	UTIL_LTV_DEBUG(0x02, ase_debug_context),
 	UTIL_LTV_DEBUG(0x03, ase_debug_program_info),
diff --git a/src/shared/util.c b/src/shared/util.c
index cebb02c..34491f4 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -157,8 +157,8 @@ uint64_t util_debug_bit(const char *label, uint64_t val,
 	return mask;
 }
 
-static struct util_ltv_debugger*
-ltv_debugger(struct util_ltv_debugger *debugger, size_t num, uint8_t type)
+static const struct util_ltv_debugger*
+ltv_debugger(const struct util_ltv_debugger *debugger, size_t num, uint8_t type)
 {
 	size_t i;
 
@@ -166,7 +166,7 @@ ltv_debugger(struct util_ltv_debugger *debugger, size_t num, uint8_t type)
 		return NULL;
 
 	for (i = 0; i < num; i++) {
-		struct util_ltv_debugger *debug = &debugger[i];
+		const struct util_ltv_debugger *debug = &debugger[i];
 
 		if (debug->type == type)
 			return debug;
@@ -177,7 +177,7 @@ ltv_debugger(struct util_ltv_debugger *debugger, size_t num, uint8_t type)
 
 /* Helper to print debug information of LTV entries */
 bool util_debug_ltv(const uint8_t *data, uint8_t len,
-			struct util_ltv_debugger *debugger, size_t num,
+			const struct util_ltv_debugger *debugger, size_t num,
 			util_debug_func_t function, void *user_data)
 {
 	struct iovec iov;
@@ -188,7 +188,7 @@ bool util_debug_ltv(const uint8_t *data, uint8_t len,
 
 	for (i = 0; iov.iov_len; i++) {
 		uint8_t l, t, *v;
-		struct util_ltv_debugger *debug;
+		const struct util_ltv_debugger *debug;
 
 		if (!util_iov_pull_u8(&iov, &l)) {
 			util_debug(function, user_data,
diff --git a/src/shared/util.h b/src/shared/util.h
index 44205d7..6698d00 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -135,7 +135,7 @@ struct util_ltv_debugger {
 };
 
 bool util_debug_ltv(const uint8_t *data, uint8_t len,
-			struct util_ltv_debugger *debugger, size_t num,
+			const struct util_ltv_debugger *debugger, size_t num,
 			util_debug_func_t function, void *user_data);
 
 unsigned char util_get_dt(const char *parent, const char *name);