sys/dev/disk/dm: Cleanup
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Wed, 21 Sep 2016 02:29:49 +0000 (11:29 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 1 Oct 2016 21:53:07 +0000 (06:53 +0900)
sys/dev/disk/dm/device-mapper.c

index 1d2d7c1..5c2d1c8 100644 (file)
@@ -579,15 +579,11 @@ dmsize(struct dev_psize_args *ap)
 {
        cdev_t dev = ap->a_head.a_dev;
        dm_dev_t *dmv;
-       uint64_t size;
-
-       size = 0;
 
        if ((dmv = dev->si_drv1) == NULL)
                return ENXIO;
 
-       size = dm_table_size(&dmv->table_head);
-       ap->a_result = (int64_t)size;
+       ap->a_result = (int64_t)dm_table_size(&dmv->table_head);
 
        return 0;
 }