[evolution] e-editor-dom-functions: Do not override variable name from parent block



commit 08394616b718ff430d95fb7d11780712ae77b78e
Author: Milan Crha <mcrha redhat com>
Date:   Thu Feb 9 13:00:26 2017 +0100

    e-editor-dom-functions: Do not override variable name from parent block
    
    The 'length' is used for the 'for' cycle and also inside the 'for'.
    Better to not clash on them, to not cause confusion.

 .../web-extension/e-editor-dom-functions.c         |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c 
b/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
index 706d427..71ffcc4 100644
--- a/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/src/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -7230,21 +7230,21 @@ process_node_to_plain_text_for_exporting (EEditorPage *editor_page,
 
                                if (!g_str_has_prefix (css_align + 13, "left")) {
                                        gchar *align;
-                                       gint length;
+                                       gint len;
 
                                        if (g_str_has_prefix (css_align + 13, "center"))
-                                               length = (word_wrap_length - g_utf8_strlen (content, -1)) / 2;
+                                               len = (word_wrap_length - g_utf8_strlen (content, -1)) / 2;
                                        else
-                                               length = word_wrap_length - g_utf8_strlen (content, -1);
+                                               len = word_wrap_length - g_utf8_strlen (content, -1);
 
-                                       if (length < 0)
-                                               length = 0;
+                                       if (len < 0)
+                                               len = 0;
 
                                        if (g_str_has_suffix (content, " ")) {
-                                               char *tmp;
+                                               gchar *tmp;
 
-                                               length++;
-                                               align = g_strnfill (length, ' ');
+                                               len++;
+                                               align = g_strnfill (len, ' ');
 
                                                tmp = g_strndup (content, g_utf8_strlen (content, -1) -1);
 
@@ -7252,7 +7252,7 @@ process_node_to_plain_text_for_exporting (EEditorPage *editor_page,
                                                        align, tmp, NULL);
                                                g_free (tmp);
                                        } else {
-                                               align = g_strnfill (length, ' ');
+                                               align = g_strnfill (len, ' ');
 
                                                content_with_align = g_strconcat (
                                                        align, content, NULL);


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