[tracker/epub-metadata-improvements: 6/7] tracker-extract-epub: Fixed remaining strndup() cases and some coding styles



commit a802a2a2be1b88cb1d5e5bca4bbf175af195323a
Author: Martyn Russell <martyn lanedo com>
Date:   Fri Sep 13 10:53:28 2013 +0100

    tracker-extract-epub: Fixed remaining strndup() cases and some coding styles

 src/tracker-extract/tracker-extract-epub.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-epub.c b/src/tracker-extract/tracker-extract-epub.c
index 053afff..33b85b8 100644
--- a/src/tracker-extract/tracker-extract-epub.c
+++ b/src/tracker-extract/tracker-extract-epub.c
@@ -314,7 +314,7 @@ opf_xml_text_handler (GMarkupParseContext   *context,
                        } else {
                                for (; i <= len; i++) {
                                        if (i == len || data->savedstring[i] == ' ') {
-                                               gname = g_strndup (data->savedstring + j, i-j);
+                                               gname = g_strndup (data->savedstring + j, i - j);
                                                g_debug ("Found given name:'%s'", gname);
 
                                                for (; data->savedstring[i] == ',' || data->savedstring[i] == 
' '; i++);
@@ -339,7 +339,7 @@ opf_xml_text_handler (GMarkupParseContext   *context,
                                if (text[i] == ' ') {
                                        gname = g_strndup (text, i);
                                        g_debug ("Found given name:'%s'", gname);
-                                       j = i+1;
+                                       j = i + 1;
 
                                        break;
                                }
@@ -355,7 +355,7 @@ opf_xml_text_handler (GMarkupParseContext   *context,
                                                g_debug ("Found family name:'%s'", fname);
 
                                                if (i > j) {
-                                                       oname = strndup (text+j, i-j);
+                                                       oname = g_strndup (text + j, i - j);
                                                        g_debug ("Found other name:'%s'", oname);
                                                }
 


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