| Index: examples/albumart.c
|
| diff --git a/examples/albumart.c b/examples/albumart.c
|
| index c98b305086dfd944fc6100961f637853f25eac96..350ba4507d98917228742edbffa73cb461014488 100644
|
| --- a/examples/albumart.c
|
| +++ b/examples/albumart.c
|
| @@ -55,6 +55,7 @@ int main (int argc, char **argv) {
|
| struct stat statbuff;
|
| uint32_t storageid = 0;
|
| uint32_t parentid = 0;
|
| + int ret;
|
|
|
| fprintf(stdout, "libmtp version: " LIBMTP_VERSION_STRING "\n\n");
|
|
|
| @@ -124,7 +125,8 @@ int main (int argc, char **argv) {
|
| return 1;
|
| }
|
| else {
|
| - read(fd, imagedata, filesize);
|
| + ret = read(fd, imagedata, filesize);
|
| + if (ret == -1) perror("read");
|
| close(fd);
|
| }
|
|
|
| @@ -146,7 +148,8 @@ int main (int argc, char **argv) {
|
| album->tracks = ids;
|
| album->parent_id = parentid;
|
| album->storage_id = storageid;
|
| - int ret = LIBMTP_Create_New_Album(device,album);
|
| +
|
| + ret = LIBMTP_Create_New_Album(device,album);
|
| if (ret == 0) {
|
| ret = LIBMTP_Send_Representative_Sample(device,album->album_id, albumart);
|
| if (ret != 0) {
|
|
|