Fix else if and maxFileSize initializer.

Change-Id: Iac7852a4fb2add5744d5ea424d6ad5a82828f102
diff --git a/mtp/MtpServer.cpp b/mtp/MtpServer.cpp
index f99554b..142b821 100755
--- a/mtp/MtpServer.cpp
+++ b/mtp/MtpServer.cpp
@@ -1001,6 +1001,7 @@
 		return MTP_RESPONSE_STORAGE_FULL;
 	uint64_t maxFileSize = storage->getMaxFileSize();
 	// check storage max file size
+	MTPD("maxFileSize: %ld\n", maxFileSize); 
 	if (maxFileSize != 0) {
 		// if mSendObjectFileSize is 0xFFFFFFFF, then all we know is the file size
 		// is >= 0xFFFFFFFF
diff --git a/mtp/mtp_MtpServer.cpp b/mtp/mtp_MtpServer.cpp
index f49270f..5f509eb 100755
--- a/mtp/mtp_MtpServer.cpp
+++ b/mtp/mtp_MtpServer.cpp
@@ -130,7 +130,7 @@
 				int storageID = stores->at(i)->mtpid;
 				long reserveSpace = 1;
 				bool removable = false;
-				long maxFileSize = stores->at(i)->maxFileSize;
+				uint64_t maxFileSize = stores->at(i)->maxFileSize;
 				if (descriptionStr != "") {
 					MtpStorage* storage = new MtpStorage(storageID, &pathStr[0], &descriptionStr[0], reserveSpace, removable, maxFileSize, refserver);
 					server->addStorage(storage);
diff --git a/partition.cpp b/partition.cpp
index 80eb5aa..9770a5f 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -2056,19 +2056,18 @@
 	const uint64_t constTB = (uint64_t) constGB * 1024;
 	const uint64_t constPB = (uint64_t) constTB * 1024;
 	const uint64_t constEB = (uint64_t) constPB * 1024;
-
-				if (Current_File_System == "ext4")
-								maxFileSize = 16 * constTB; //16 TB
-				else if (Current_File_System == "vfat")
-								maxFileSize = 4 * constGB; //4 GB
-				else if (Current_File_System == "ntfs")
-								maxFileSize = 256 * constTB; //256 TB
-				if (Current_File_System == "exfat")
-								maxFileSize = 16 * constPB; //16 PB
-				else if (Current_File_System == "ext3")
-								maxFileSize = 2 * constTB; //2 TB
-				else if (Current_File_System == "f2fs")
-							maxFileSize = 3.94 * constTB; //3.94 TB
+	if (Current_File_System == "ext4")
+		maxFileSize = 16 * constTB; //16 TB
+	else if (Current_File_System == "vfat")
+		maxFileSize = 4 * constGB; //4 GB
+	else if (Current_File_System == "ntfs")
+		maxFileSize = 256 * constTB; //256 TB
+	else if (Current_File_System == "exfat")
+		maxFileSize = 16 * constPB; //16 PB
+	else if (Current_File_System == "ext3")
+		maxFileSize = 2 * constTB; //2 TB
+	else if (Current_File_System == "f2fs")
+		maxFileSize = 3.94 * constTB; //3.94 TB
 	else
 		maxFileSize = 100000000L;
 	return maxFileSize - 1;
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 72eb43d..003dcd1 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -1930,7 +1930,7 @@
 	twrpMtp *mtp = new twrpMtp(DataManager::GetIntValue("tw_mtp_debug"));
 	for (iter = Partitions.begin(); iter != Partitions.end(); iter++) {
 		if ((*iter)->Is_Storage && (*iter)->Is_Present && (*iter)->Mount(false)) {
-			printf("twrp addStorage %s, mtpstorageid: %u\n", (*iter)->Storage_Path.c_str(), (*iter)->MTP_Storage_ID);
+			printf("twrp addStorage %s, mtpstorageid: %u, maxFileSize: %lld\n", (*iter)->Storage_Path.c_str(), (*iter)->MTP_Storage_ID, (*iter)->Get_Max_FileSize());
 			mtp->addStorage((*iter)->Storage_Name, (*iter)->Storage_Path, (*iter)->MTP_Storage_ID, (*iter)->Get_Max_FileSize());
 			count++;
 		}