static void test_connected_drives (void) { GList *drives; GList *l; drives = g_volume_monitor_get_connected_drives (monitor); for (l = drives; l; l = l->next) { GDrive *drive = l->data; do_drive_tests (drive); } g_list_free_full (drives, g_object_unref); }
static void test_connected_drives (void) { GList *drives; GList *l; drives = g_volume_monitor_get_connected_drives (monitor); for (l = drives; l; l = l->next) { GDrive *drive = l->data; do_drive_tests (drive); } g_list_foreach (drives, (GFunc)g_object_unref, NULL); g_list_free (drives); }