There was some misformatted code that seemed like switch block having an
else block. This improves code readability.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Michael Heimpold <mhei@heimpold.de>
if (m && m->extroot)
return -1;
- if (m) switch (type) {
- case TYPE_HOTPLUG:
- blockd_notify(device, m, pr);
- if (m->autofs)
- return 0;
- if (!auto_mount)
- return -1;
- break;
- case TYPE_AUTOFS:
- if (!m->autofs)
- return -1;
- break;
- case TYPE_DEV:
- if (m->autofs)
- return -1;
- break;
+ if (m) {
+ switch (type) {
+ case TYPE_HOTPLUG:
+ blockd_notify(device, m, pr);
+ if (m->autofs)
+ return 0;
+ if (!auto_mount)
+ return -1;
+ break;
+ case TYPE_AUTOFS:
+ if (!m->autofs)
+ return -1;
+ break;
+ case TYPE_DEV:
+ if (m->autofs)
+ return -1;
+ break;
+ }
} else if (type == TYPE_HOTPLUG) {
blockd_notify(device, NULL, pr);
}