Revision: 2345
          http://gtkpod.svn.sourceforge.net/gtkpod/?rev=2345&view=rev
Author:   teuf
Date:     2009-05-02 19:23:13 +0000 (Sat, 02 May 2009)

Log Message:
-----------
Remove or rework any dead code.

1. ctx is guaranteed to be null. So the conditional never executes.
2. fix logic error which would cause the else clause to never be executed.
3. dir_file is already guaranteed to be non-null.
4. error cannot be true.

Modified Paths:
--------------
    libgpod/trunk/ChangeLog
    libgpod/trunk/src/db-artwork-parser.c
    libgpod/trunk/src/itdb_device.c
    libgpod/trunk/src/itdb_itunesdb.c
    libgpod/trunk/tests/test-ls.c

Modified: libgpod/trunk/ChangeLog
===================================================================
--- libgpod/trunk/ChangeLog     2009-05-02 19:22:44 UTC (rev 2344)
+++ libgpod/trunk/ChangeLog     2009-05-02 19:23:13 UTC (rev 2345)
@@ -2,6 +2,19 @@
 
        Patch from: Erik Hovland <[email protected]>
 
+       Remove or rework any dead code.
+
+       * src/db-artwork-parser.c: ctx is guaranteed to be null. So the
+       conditional never executes.
+       * src/itdb_device.c: fix logic error which would cause the else 
+       clause to never be executed.
+       * src/itdb_itunesdb.c: dir_file is already guaranteed to be non-null.
+       * tests/test-ls.c: error cannot be true.
+
+2009-05-02  Christophe Fergeau  <[email protected]>
+
+       Patch from: Erik Hovland <[email protected]>
+
        Make sure pointers are valid when necessary.
 
        * src/itdb_itunesdb.c: m53 might be null. Check before dereferencing

Modified: libgpod/trunk/src/db-artwork-parser.c
===================================================================
--- libgpod/trunk/src/db-artwork-parser.c       2009-05-02 19:22:44 UTC (rev 
2344)
+++ libgpod/trunk/src/db-artwork-parser.c       2009-05-02 19:23:13 UTC (rev 
2345)
@@ -733,9 +733,6 @@
        return 0;
 
  error:
-       if (ctx != NULL) {
-               db_parse_context_destroy (ctx);
-       }
        return -1;
 }
 

Modified: libgpod/trunk/src/itdb_device.c
===================================================================
--- libgpod/trunk/src/itdb_device.c     2009-05-02 19:22:44 UTC (rev 2344)
+++ libgpod/trunk/src/itdb_device.c     2009-05-02 19:23:13 UTC (rev 2345)
@@ -990,7 +990,7 @@
     g_return_if_fail (device->sysinfo);
     g_return_if_fail (field);
 
-    if (field)
+    if (value)
     {
        g_hash_table_insert (device->sysinfo,
                             g_strdup (field), g_strdup (value));

Modified: libgpod/trunk/src/itdb_itunesdb.c
===================================================================
--- libgpod/trunk/src/itdb_itunesdb.c   2009-05-02 19:22:44 UTC (rev 2344)
+++ libgpod/trunk/src/itdb_itunesdb.c   2009-05-02 19:23:13 UTC (rev 2345)
@@ -459,7 +459,7 @@
            continue;
        }
       
-       new_good_path = dir_file ? g_build_filename(good_path,dir_file,NULL) : 
NULL;
+       new_good_path = g_build_filename(good_path,dir_file,NULL);
        g_free(good_path);
        good_path= new_good_path;
        /* This is the matching entry, so we can stop searching */

Modified: libgpod/trunk/tests/test-ls.c
===================================================================
--- libgpod/trunk/tests/test-ls.c       2009-05-02 19:22:44 UTC (rev 2344)
+++ libgpod/trunk/tests/test-ls.c       2009-05-02 19:23:13 UTC (rev 2345)
@@ -155,15 +155,6 @@
            display_playlist (playlist, "");
       }
 
-      if (error)
-      {
-         if (error->message) {
-             g_print ("%s\n", error->message);
-         }
-         g_error_free (error);
-         error = NULL;
-      }
-
       display_recently_played (itdb);
   }
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to