summaryrefslogtreecommitdiff
path: root/gtk/gtktextbtree.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-06-09 18:36:58 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-06-09 18:36:58 +0000
commite09c96088524bccdf9846b0e63ab09173191d060 (patch)
treee765bbeb716160c3076ee707cf44fa9a6c2f781c /gtk/gtktextbtree.c
parent8a86bcebc8cd07cbf9906230782820c2858ff375 (diff)
downloadgtk+-e09c96088524bccdf9846b0e63ab09173191d060.tar.gz
Small cleanup. (#305539, Paolo Borelli)
2005-06-09 Matthias Clasen <mclasen@redhat.com> * gtk/gtktextbtree.c (_gtk_text_btree_char_is_invisible): Small cleanup. (#305539, Paolo Borelli)
Diffstat (limited to 'gtk/gtktextbtree.c')
-rw-r--r--gtk/gtktextbtree.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c
index 050399e5f3..5ebfcf80dc 100644
--- a/gtk/gtktextbtree.c
+++ b/gtk/gtktextbtree.c
@@ -2434,7 +2434,7 @@ _gtk_text_btree_char_is_invisible (const GtkTextIter *iter)
{
gboolean invisible = FALSE; /* if nobody says otherwise, it's visible */
- int deftagCnts[LOTSA_TAGS];
+ int deftagCnts[LOTSA_TAGS] = { 0, };
int *tagCnts = deftagCnts;
GtkTextTag *deftags[LOTSA_TAGS];
GtkTextTag **tags = deftags;
@@ -2457,15 +2457,10 @@ _gtk_text_btree_char_is_invisible (const GtkTextIter *iter)
/* almost always avoid malloc, so stay out of system calls */
if (LOTSA_TAGS < numTags)
{
- tagCnts = g_new (int, numTags);
+ tagCnts = g_new0 (int, numTags);
tags = g_new (GtkTextTag*, numTags);
}
- for (i=0; i<numTags; i++)
- {
- tagCnts[i] = 0;
- }
-
/*
* Record tag toggles within the line of indexPtr but preceding
* indexPtr.