commit dd357c97ae5b3e45f9c73f830297e370044ad4ec Author: Christophe Fergeau <t...@gnome.org> Date: Sun Sep 19 12:46:01 2010 +0200
Remove unused variable in itdb_init_ipod itdb_init_ipod uses a devicefile variable to conditionnally create the Device/ directory, but this variable is always set to TRUE, so we can just get rid of it. src/itdb_itunesdb.c | 46 +++++++++++++++++++++------------------------- 1 files changed, 21 insertions(+), 25 deletions(-) --- diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c index b4e3914..e395bea 100644 --- a/src/itdb_itunesdb.c +++ b/src/itdb_itunesdb.c @@ -8128,8 +8128,9 @@ static gboolean itdb_create_directories (Itdb_Device *device, GError **error) gchar *pbuf; gint i, dirnum; Itdb_IpodInfo const *info = NULL; - gboolean calconnotes, devicefile; + gboolean calconnotes; gchar *podpath; + gchar *model_number; g_return_val_if_fail (device, FALSE); @@ -8286,33 +8287,28 @@ static gboolean itdb_create_directories (Itdb_Device *device, GError **error) } /* Construct a Device directory file for special models */ - if (devicefile) + pbuf = g_build_filename (mp, podpath, "Device", NULL); + if (!g_file_test (pbuf, G_FILE_TEST_EXISTS)) { - gchar *model_number; - - pbuf = g_build_filename (mp, podpath, "Device", NULL); - if (!g_file_test (pbuf, G_FILE_TEST_EXISTS)) - { - if((g_mkdir(pbuf, 0777) != 0)) - { - goto error_dir; - } - } - g_free (pbuf); + if((g_mkdir(pbuf, 0777) != 0)) + { + goto error_dir; + } + } + g_free (pbuf); - model_number = itdb_device_get_sysinfo (device, "ModelNumStr"); - /* Construct a SysInfo file */ - if (model_number && (strlen (model_number) != 0)) - { - pbuf = NULL; - if (!itdb_device_write_sysinfo (device, error)) - { - g_free (model_number); - goto error_dir; - } - } - g_free (model_number); + model_number = itdb_device_get_sysinfo (device, "ModelNumStr"); + /* Construct a SysInfo file */ + if (model_number && (strlen (model_number) != 0)) + { + pbuf = NULL; + if (!itdb_device_write_sysinfo (device, error)) + { + g_free (model_number); + goto error_dir; + } } + g_free (model_number); pbuf = NULL; error_dir: ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ gtkpod-cvs2 mailing list gtkpod-cvs2@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2