Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH v2 1/4] Fix constness of att_get_u{8,16,32}() functions
@ 2010-10-04 19:13 Anderson Lizardo
  2010-10-04 19:13 ` [PATCH v2 2/4] Remove typecast from att_get_u16() calls Anderson Lizardo
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Anderson Lizardo @ 2010-10-04 19:13 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Anderson Lizardo

---
 attrib/att.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/attrib/att.h b/attrib/att.h
index 69071b4..3f1e239 100644
--- a/attrib/att.h
+++ b/attrib/att.h
@@ -123,21 +123,21 @@ struct att_data_list {
 };
 
 /* These functions do byte conversion */
-static inline uint8_t att_get_u8(void *ptr)
+static inline uint8_t att_get_u8(const void *ptr)
 {
-	uint8_t *u8_ptr = ptr;
+	const uint8_t *u8_ptr = ptr;
 	return bt_get_unaligned(u8_ptr);
 }
 
-static inline uint16_t att_get_u16(void *ptr)
+static inline uint16_t att_get_u16(const void *ptr)
 {
-	uint16_t *u16_ptr = ptr;
+	const uint16_t *u16_ptr = ptr;
 	return btohs(bt_get_unaligned(u16_ptr));
 }
 
-static inline uint32_t att_get_u32(void *ptr)
+static inline uint32_t att_get_u32(const void *ptr)
 {
-	uint32_t *u32_ptr = ptr;
+	const uint32_t *u32_ptr = ptr;
 	return btohl(bt_get_unaligned(u32_ptr));
 }
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-10-04 19:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-04 19:13 [PATCH v2 1/4] Fix constness of att_get_u{8,16,32}() functions Anderson Lizardo
2010-10-04 19:13 ` [PATCH v2 2/4] Remove typecast from att_get_u16() calls Anderson Lizardo
2010-10-04 19:13 ` [PATCH v2 3/4] Replace hardcoded minimum length values with constants Anderson Lizardo
2010-10-04 19:13 ` [PATCH v2 4/4] Modify dec_read_req() to get PDU length as parameter Anderson Lizardo
2010-10-04 19:17 ` [PATCH v2 1/4] Fix constness of att_get_u{8,16,32}() functions Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox