All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH obexd v3 1/3] MAP: Mark filter strings const
@ 2012-04-12 18:53 Slawomir Bochenski
  2012-04-12 18:53 ` [PATCH obexd v3 2/3] MAP: Input parameters for GetMessagesListing Slawomir Bochenski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Slawomir Bochenski @ 2012-04-12 18:53 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Slawomir Bochenski

This structure is used for giving filters as input argument to
messages_get_messages_listing(). There is no need for the string members
to be modifiable in this context. And making them const plays well with
map_ap_get_string(), from which the values of these members are going to
be retrieved.

The string pointers here are simply references to data held in map_ap_t
*inparams.
---
v3: Add paragraph about pointers being references to data held in another data structure.
 plugins/messages.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/plugins/messages.h b/plugins/messages.h
index 00a040c..2cdd92f 100644
--- a/plugins/messages.h
+++ b/plugins/messages.h
@@ -111,11 +111,11 @@ struct messages_event {
 struct messages_filter {
 	uint32_t parameter_mask;
 	uint8_t type;
-	char *period_begin;
-	char *period_end;
+	const char *period_begin;
+	const char *period_end;
 	uint8_t read_status;
-	char *recipient;
-	char *originator;
+	const char *recipient;
+	const char *originator;
 	uint8_t priority;
 };
 
-- 
1.7.5.1


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

end of thread, other threads:[~2012-04-12 19:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-12 18:53 [PATCH obexd v3 1/3] MAP: Mark filter strings const Slawomir Bochenski
2012-04-12 18:53 ` [PATCH obexd v3 2/3] MAP: Input parameters for GetMessagesListing Slawomir Bochenski
2012-04-12 18:53 ` [PATCH obexd v3 3/3] MAP: Output " Slawomir Bochenski
2012-04-12 19:00 ` [PATCH obexd v3 1/3] MAP: Mark filter strings const Johan Hedberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.