summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/db-artwork-parser.c6
-rw-r--r--src/db-artwork-writer.c3
-rw-r--r--src/itdb_itunesdb.c6
3 files changed, 7 insertions, 8 deletions
diff --git a/src/db-artwork-parser.c b/src/db-artwork-parser.c
index df80305..52de373 100644
--- a/src/db-artwork-parser.c
+++ b/src/db-artwork-parser.c
@@ -335,7 +335,7 @@ parse_mhii (DBParseContext *ctx, GError *error)
g_free (mhod_ctx);
mhod_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
}
- ctx->db->db.photodb->photos = g_list_append (ctx->db->db.photodb->photos, artwork);
+ ctx->db->db.photodb->photos = g_list_append (ctx->db->db.photodb->photos, artwork);
break;
case DB_TYPE_ITUNES:
#ifdef NOT_DEFINED_DEBUG_ARTWORKDB
@@ -387,7 +387,7 @@ parse_mhba (DBParseContext *ctx, GError *error)
dump_mhba (mhba);
- photo_album = g_new0 (Itdb_PhotoAlbum, 1);
+ photo_album = g_new0 (Itdb_PhotoAlbum, 1);
photo_album->num_images = get_gint32( mhba->num_mhias, ctx->byte_order);
photo_album->album_id = get_gint32( mhba->playlist_id, ctx->byte_order);
photo_album->master = get_gint32( mhba->master, ctx->byte_order);
@@ -419,7 +419,7 @@ parse_mhba (DBParseContext *ctx, GError *error)
g_free (mhia_ctx);
mhia_ctx = db_parse_context_get_sub_context (ctx, cur_offset);
}
- ctx->db->db.photodb->photoalbums = g_list_append (ctx->db->db.photodb->photoalbums, photo_album);
+ ctx->db->db.photodb->photoalbums = g_list_append (ctx->db->db.photodb->photoalbums, photo_album);
return 0;
}
diff --git a/src/db-artwork-writer.c b/src/db-artwork-writer.c
index 079644c..cd97e56 100644
--- a/src/db-artwork-writer.c
+++ b/src/db-artwork-writer.c
@@ -453,7 +453,8 @@ write_mhni (Itdb_DB *db, Itdb_Thumb *thumb, int correlation_id, iPodBuffer *buff
mhni->ithmb_offset = get_gint32 (thumb->offset, buffer->byte_order);
/* Work out the image padding */
- format = itdb_device_get_artwork_formats (db->db.photodb->device);
+ format = itdb_device_get_artwork_formats (db_get_device (db));
+ g_return_val_if_fail (format, 0);
while( format->type != thumb->type && format->type != -1 )
format++;
mhni->vertical_padding = get_gint16 (
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
index 0ca21d3..b4e4ac1 100644
--- a/src/itdb_itunesdb.c
+++ b/src/itdb_itunesdb.c
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-05-30 21:59:40 jcs>
+/* Time-stamp: <2006-06-01 22:09:17 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -4821,13 +4821,11 @@ Itdb_Device *db_get_device(Itdb_DB *db)
switch (db->db_type) {
case DB_TYPE_ITUNES:
- g_return_val_if_fail (db->db.itdb->device, NULL);
return db->db.itdb->device;
case DB_TYPE_PHOTO:
- g_return_val_if_fail (db->db.photodb->device, NULL);
return db->db.photodb->device;
}
- return NULL;
+ g_return_val_if_reached (NULL);
}