shithub: lwext4

Download patch

ref: cc66c4021879f44ff267298c4a666ae8d78d9e43
parent: d9ca5ea27b833522557cbcd2b382d01a14866c76
parent: ab4ed9a604bc6bc797dfa7e01e3612f1bc915bdd
author: Grzegorz Kostka <kostka.grzegorz@gmail.com>
date: Tue Oct 17 20:47:00 EDT 2017

Merge pull request #32 from enetor/useless-if

Remove an unuseful if check in ext4.c.

--- a/src/ext4.c
+++ b/src/ext4.c
@@ -379,11 +379,9 @@
 		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;
 		}
 	}