summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-icon-info.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-05-02 01:09:20 +0200
committerraveit65 <[email protected]>2022-07-20 00:04:14 +0200
commitfdb2e20b29bd1d2cf6e7b1a2fb93fc52c631927f (patch)
tree1c8c8a9001e359113708688dd9c98cdee15ad85a /libcaja-private/caja-icon-info.c
parent64b7d2640fc91c28db3a16239f8fe5f6243bec26 (diff)
downloadcaja-fdb2e20b29bd1d2cf6e7b1a2fb93fc52c631927f.tar.bz2
caja-fdb2e20b29bd1d2cf6e7b1a2fb93fc52c631927f.tar.xz
libcaja-private: reduce the scope of some variables
Diffstat (limited to 'libcaja-private/caja-icon-info.c')
-rw-r--r--libcaja-private/caja-icon-info.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcaja-private/caja-icon-info.c b/libcaja-private/caja-icon-info.c
index b3f33735..4ad58e45 100644
--- a/libcaja-private/caja-icon-info.c
+++ b/libcaja-private/caja-icon-info.c
@@ -148,7 +148,7 @@ caja_icon_info_new_for_icon_info (GtkIconInfo *icon_info,
GdkPoint *points;
gint n_points;
const char *filename;
- char *basename, *p;
+ char *basename;
icon = g_object_new (CAJA_TYPE_ICON_INFO, NULL);
@@ -168,6 +168,8 @@ caja_icon_info_new_for_icon_info (GtkIconInfo *icon_info,
filename = gtk_icon_info_get_filename (icon_info);
if (filename != NULL)
{
+ char *p;
+
basename = g_path_get_basename (filename);
p = strrchr (basename, '.');
if (p)