[cheese] Fix const cast warnings
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese] Fix const cast warnings
- Date: Mon, 16 Feb 2015 21:44:37 +0000 (UTC)
commit d09497d7132028bcd68fc56957e12d2ff3490f20
Author: David King <amigadave amigadave com>
Date: Thu Jan 29 12:31:01 2015 +0000
Fix const cast warnings
libcheese/cheese-fileutil.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/libcheese/cheese-fileutil.c b/libcheese/cheese-fileutil.c
index c7d0612..d2d1658 100644
--- a/libcheese/cheese-fileutil.c
+++ b/libcheese/cheese-fileutil.c
@@ -163,7 +163,10 @@ cheese_fileutil_get_new_media_filename (CheeseFileUtil *fileutil, CheeseMediaMod
case CHEESE_MEDIA_MODE_BURST:
priv->burst_count++;
if (strlen (priv->burst_raw_name) == 0)
+ {
+ g_free (priv->burst_raw_name);
priv->burst_raw_name = g_strdup_printf ("%s%s%s", path, G_DIR_SEPARATOR_S, time_string);
+ }
filename = g_strdup_printf ("%s_%d%s", priv->burst_raw_name, priv->burst_count,
CHEESE_PHOTO_NAME_SUFFIX);
break;
@@ -226,7 +229,8 @@ cheese_fileutil_reset_burst (CheeseFileUtil *fileutil)
priv = cheese_fileutil_get_instance_private (fileutil);
priv->burst_count = 0;
- priv->burst_raw_name = "";
+ g_free (priv->burst_raw_name);
+ priv->burst_raw_name = g_strdup ("");
}
static void
@@ -237,6 +241,7 @@ cheese_fileutil_finalize (GObject *object)
g_free (priv->video_path);
g_free (priv->photo_path);
+ g_free (priv->burst_raw_name);
G_OBJECT_CLASS (cheese_fileutil_parent_class)->finalize (object);
}
@@ -256,7 +261,7 @@ cheese_fileutil_init (CheeseFileUtil *fileutil)
GSettings *settings;
priv->burst_count = 0;
- priv->burst_raw_name = "";
+ priv->burst_raw_name = g_strdup ("");
settings = g_settings_new ("org.gnome.Cheese");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]