[libdmapsharing] Use strlen() instead of hard-coding string length



commit 617164b22dbbe17490377c56f8a859541e9fcfdb
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Oct 29 11:34:20 2013 +0100

    Use strlen() instead of hard-coding string length
    
    This avoids hard to detect bugs when we want a different string length,
    and will be optimised by the compiler anyway.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711063

 libdmapsharing/daap-share.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libdmapsharing/daap-share.c b/libdmapsharing/daap-share.c
index 6b719f5..66cdfe6 100644
--- a/libdmapsharing/daap-share.c
+++ b/libdmapsharing/daap-share.c
@@ -922,7 +922,7 @@ databases_items_xxx (DMAPShare * share,
                const gchar *s;
                gchar *content_range;
 
-               s = range_header + 6;   /* bytes= */
+               s = range_header + strlen ("bytes=");   /* bytes= */
                offset = atoll (s);
 
                content_range =


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]