diff options
| author | Fan Deng <enetor@gmail.com> | 2017-10-17 11:33:18 -0700 |
|---|---|---|
| committer | Fan Deng <enetor@gmail.com> | 2017-10-17 11:33:18 -0700 |
| commit | ab4ed9a604bc6bc797dfa7e01e3612f1bc915bdd (patch) | |
| tree | 3146833fd2755882b92c61213bb26ab232a129ae | |
| parent | d9ca5ea27b833522557cbcd2b382d01a14866c76 (diff) | |
Remove an unuseful if check in ext4.c.
The if check on s_bdevices[i].name is unuseful, as 'name' always
evaluates to true:
if (s_bdevices[i].name) {
...
}
This change removes the check to be consistent with the rest of the code
(see line 124 and 144).
| -rw-r--r-- | src/ext4.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -379,11 +379,9 @@ int ext4_mount(const char *dev_name, const char *mount_point, return ENOTSUP; for (size_t i = 0; i < CONFIG_EXT4_BLOCKDEVS_COUNT; ++i) { - if (s_bdevices[i].name) { - if (!strcmp(dev_name, s_bdevices[i].name)) { - bd = s_bdevices[i].bd; - break; - } + if (!strcmp(dev_name, s_bdevices[i].name)) { + bd = s_bdevices[i].bd; + break; } } |
