Bug #5668

Switch statement with single case in vdev_disk.c seems inappropriate

Added by Sam Zaydel over 3 years ago.

Status:NewStart date:2015-02-27
Priority:LowDue date:
Assignee:-% Done:

0%

Category:zfs - Zettabyte File System
Target version:-
Difficulty:Bite-size Tags:needs-triage

Description

It looks to me like this is something that should be changed to an if statement, since there is really only one case and the default effectively matches anything other than the case does. Seems like an if clause is more suitable here.

https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/fs/zfs/vdev_disk.c#L746

Also available in: Atom