X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=utils.c;h=4a16413cc282c71d84f933ad033d44399003f3c0;hb=8075fd4da1a5c759261413461a4bd7f9af81722c;hp=3d0369f002fa7e86d27f512db044fd0ea060240e;hpb=90a00b3c79584eee7c282623c39ec88d3662be25;p=platform%2Fupstream%2Fbtrfs-progs.git diff --git a/utils.c b/utils.c index 3d0369f..4a16413 100644 --- a/utils.c +++ b/utils.c @@ -819,14 +819,9 @@ static int blk_file_in_dev_list(struct btrfs_fs_devices* fs_devices, const char* file) { int ret; - struct list_head *head; - struct list_head *cur; struct btrfs_device *device; - head = &fs_devices->devices; - list_for_each(cur, head) { - device = list_entry(cur, struct btrfs_device, dev_list); - + list_for_each_entry(device, &fs_devices->devices, dev_list) { if((ret = is_same_loop_file(device->name, file))) return ret; }