Revision: 2004
http://gtkpod.svn.sourceforge.net/gtkpod/?rev=2004&view=rev
Author: jcsjcs
Date: 2008-06-01 01:47:54 -0700 (Sun, 01 Jun 2008)
Log Message:
-----------
* src/itdb_thumb.c
remove some unnecessary checks for NULL pointer
(itdb_thumb_duplicate): move g_list_reverse() outside the loop
modifying the list.
Modified Paths:
--------------
libgpod/trunk/ChangeLog
libgpod/trunk/src/itdb_thumb.c
Modified: libgpod/trunk/ChangeLog
===================================================================
--- libgpod/trunk/ChangeLog 2008-05-31 22:33:00 UTC (rev 2003)
+++ libgpod/trunk/ChangeLog 2008-06-01 08:47:54 UTC (rev 2004)
@@ -1,3 +1,10 @@
+2008-06-01 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+ * src/itdb_thumb.c
+ remove some unnecessary checks for NULL pointer
+ (itdb_thumb_duplicate): move g_list_reverse() outside the loop
+ modifying the list.
+
2008-05-30 Jorg Schuler <jcsjcs at users.sourceforge.net>
* src/itdb_thumb.c
Modified: libgpod/trunk/src/itdb_thumb.c
===================================================================
--- libgpod/trunk/src/itdb_thumb.c 2008-05-31 22:33:00 UTC (rev 2003)
+++ libgpod/trunk/src/itdb_thumb.c 2008-06-01 08:47:54 UTC (rev 2004)
@@ -152,9 +152,7 @@
g_return_val_if_fail (item != NULL, NULL);
new_item = itdb_thumb_new_item_from_ipod (item->format);
- if (new_item == NULL) {
- return NULL;
- }
+
new_item->filename = g_strdup (item->filename);
new_item->offset = item->offset;
new_item->size = item->size;
@@ -198,17 +196,14 @@
Itdb_Thumb_Ipod *new_thumb;
GList *it;
new_thumb = (Itdb_Thumb_Ipod *)itdb_thumb_ipod_new ();
- if (new_thumb == NULL) {
- return NULL;
- }
for (it = thumb_ipod->thumbs; it != NULL; it = it->next) {
Itdb_Thumb_Ipod_Item *item;
item = itdb_thumb_ipod_item_duplicate (it->data);
if (item != NULL) {
itdb_thumb_ipod_add (new_thumb, item);
}
- new_thumb->thumbs = g_list_reverse (new_thumb->thumbs);
}
+ new_thumb->thumbs = g_list_reverse (new_thumb->thumbs);
return (Itdb_Thumb *)new_thumb;
}
case ITDB_THUMB_TYPE_INVALID:
@@ -360,6 +355,7 @@
gint width, gint height)
{
GdkPixbuf *pixbuf=NULL;
+
if (thumb->data_type == ITDB_THUMB_TYPE_FILE)
{
Itdb_Thumb_File *thumb_file = (Itdb_Thumb_File *)thumb;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2