Thread (12 messages) flat view 12 messages, 3 authors, 2011-09-27

Re: [PATCH 3/5] avrcp: use LAST element on media_info_id enum

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2011-09-16 07:49:40

Hi Lucas, David,

On Thu, Sep 15, 2011 at 7:21 AM, Lucas De Marchi
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
From: David Stockwell <redacted>

---
 audio/avrcp.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/audio/avrcp.c b/audio/avrcp.c
index 783ba02..f7f3924 100644
--- a/audio/avrcp.c
+++ b/audio/avrcp.c
@@ -142,6 +142,7 @@ enum media_info_id {
       MEDIA_INFO_N_TRACKS =           5,
       MEDIA_INFO_GENRE =              6,
       MEDIA_INFO_CURRENT_POSITION =   7,
+       MEDIA_INFO_LAST
 };

 #if __BYTE_ORDER == __LITTLE_ENDIAN
@@ -890,7 +891,7 @@ static uint8_t avrcp_handle_get_element_attributes(struct media_player *mp,
                * Return all available information, at least
                * title must be returned.
                */
-               for (i = 1; i <= MEDIA_INFO_CURRENT_POSITION; i++) {
+               for (i = 1; i < MEDIA_INFO_LAST; i++) {
                       size = mp_get_media_attribute(mp, i,
                                                       &pdu->params[pos]);

--
1.7.6.1
Ack.


-- 
Luiz Augusto von Dentz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help