summaryrefslogtreecommitdiff
path: root/src/caja-history-sidebar.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-06-14 09:30:32 +0200
committerZenWalker <[email protected]>2019-06-17 15:18:27 +0200
commitef29013fdfd0df5d4a3cc6c5a8fb1583aabef952 (patch)
tree51c2c4afb9259ec97ba3303591bbc8e946f277d9 /src/caja-history-sidebar.c
parentcbd6b367e9b05c08bff88ee1cfa03c09c7ee2558 (diff)
downloadcaja-ef29013fdfd0df5d4a3cc6c5a8fb1583aabef952.tar.bz2
caja-ef29013fdfd0df5d4a3cc6c5a8fb1583aabef952.tar.xz
src: reduce the scope of some variables
Diffstat (limited to 'src/caja-history-sidebar.c')
-rw-r--r--src/caja-history-sidebar.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/caja-history-sidebar.c b/src/caja-history-sidebar.c
index 2b68c17c..6e32ac95 100644
--- a/src/caja-history-sidebar.c
+++ b/src/caja-history-sidebar.c
@@ -92,11 +92,10 @@ update_history (CajaHistorySidebar *sidebar)
{
GtkListStore *store;
GtkTreeSelection *selection;
- CajaBookmark *bookmark;
- cairo_surface_t *surface;
GtkTreeIter iter;
- char *name;
GList *l, *history;
+ CajaBookmark *bookmark = NULL;
+ cairo_surface_t *surface = NULL;
store = GTK_LIST_STORE (gtk_tree_view_get_model (sidebar->tree_view));
@@ -105,6 +104,8 @@ update_history (CajaHistorySidebar *sidebar)
history = caja_window_info_get_history (sidebar->window);
for (l = history; l != NULL; l = l->next)
{
+ char *name;
+
bookmark = caja_bookmark_copy (l->data);
surface = caja_bookmark_get_surface (bookmark, GTK_ICON_SIZE_MENU);