int slot;
for (slot = 1; slot < MTP_MAX_SLOT; slot++) {
- if (mtp_ctx->device_list->device_info_list[slot] == NULL) {
+ if (mtp_ctx->device_list->device_info_list[slot] == NULL)
return slot;
- }
}
return -1;
/* scan db and if exist, then update db */
if (object_info != NULL && device_id >= 0) {
- if (mtp_daemon_db_is_exist(device_id, object_info->StorageID, param1, mtp_ctx) == true) {
+ if (mtp_daemon_db_is_exist(device_id, object_info->StorageID, param1, mtp_ctx) == true)
mtp_daemon_db_update(device_id, param1, object_info, mtp_ctx);
- } else {
+ else
mtp_daemon_db_insert(device_id, object_info->StorageID, param1, object_info, mtp_ctx);
- }
}
g_free(object_info);