changeset 285:b0136b8000f9

More formatting
author charles
date Mon, 09 Mar 2009 07:41:10 +0000
parents 384462c8dec3
children 8ddf7a32a1e0
files yaffs_mtdif1.c yaffs_packedtags1.c yaffs_packedtags2.c yaffs_tagscompat.c
diffstat 4 files changed, 15 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/yaffs_mtdif1.c
+++ b/yaffs_mtdif1.c
@@ -336,9 +336,8 @@ int nandmtd1_QueryNANDBlock(struct yaffs
 	/* We don't yet have a good place to test for MTD config prerequists.
 	 * Do it here as we are called during the initial scan.
 	 */
-	if (nandmtd1_TestPrerequists(mtd) != YAFFS_OK) {
+	if (nandmtd1_TestPrerequists(mtd) != YAFFS_OK)
 		return YAFFS_FAIL;
-	}
 
 	retval = nandmtd1_ReadChunkWithTagsFromNAND(dev, chunkNo, NULL, &etags);
 	etags.blockBad = (mtd->block_isbad)(mtd, addr);
--- a/yaffs_packedtags1.c
+++ b/yaffs_packedtags1.c
@@ -35,9 +35,8 @@ 0xff };
 
 	if (memcmp(allFF, pt, sizeof(yaffs_PackedTags1))) {
 		t->blockBad = 0;
-		if (pt->shouldBeFF != 0xFFFFFFFF) {
+		if (pt->shouldBeFF != 0xFFFFFFFF)
 			t->blockBad = 1;
-		}
 		t->chunkUsed = 1;
 		t->objectId = pt->objectId;
 		t->chunkId = pt->chunkId;
--- a/yaffs_packedtags2.c
+++ b/yaffs_packedtags2.c
@@ -74,24 +74,21 @@ void yaffs_PackTags2TagsPart(yaffs_Packe
 		/* We save the parent object in the chunkId */
 		ptt->chunkId = EXTRA_HEADER_INFO_FLAG
 			| t->extraParentObjectId;
-		if (t->extraIsShrinkHeader) {
+		if (t->extraIsShrinkHeader)
 			ptt->chunkId |= EXTRA_SHRINK_FLAG;
-		}
-		if (t->extraShadows) {
+		if (t->extraShadows)
 			ptt->chunkId |= EXTRA_SHADOWS_FLAG;
-		}
 
 		ptt->objectId &= ~EXTRA_OBJECT_TYPE_MASK;
 		ptt->objectId |=
 		    (t->extraObjectType << EXTRA_OBJECT_TYPE_SHIFT);
 
-		if (t->extraObjectType == YAFFS_OBJECT_TYPE_HARDLINK) {
+		if (t->extraObjectType == YAFFS_OBJECT_TYPE_HARDLINK)
 			ptt->byteCount = t->extraEquivalentObjectId;
-		} else if (t->extraObjectType == YAFFS_OBJECT_TYPE_FILE) {
+		else if (t->extraObjectType == YAFFS_OBJECT_TYPE_FILE)
 			ptt->byteCount = t->extraFileLength;
-		} else {
+		else
 			ptt->byteCount = 0;
-		}
 	}
 
 	yaffs_DumpPackedTags2TagsPart(ptt);
@@ -148,11 +145,10 @@ void yaffs_UnpackTags2TagsPart(yaffs_Ext
 			    ptt->objectId >> EXTRA_OBJECT_TYPE_SHIFT;
 			t->objectId &= ~EXTRA_OBJECT_TYPE_MASK;
 
-			if (t->extraObjectType == YAFFS_OBJECT_TYPE_HARDLINK) {
+			if (t->extraObjectType == YAFFS_OBJECT_TYPE_HARDLINK)
 				t->extraEquivalentObjectId = ptt->byteCount;
-			} else {
+			else
 				t->extraFileLength = ptt->byteCount;
-			}
 		}
 	}
 
--- a/yaffs_tagscompat.c
+++ b/yaffs_tagscompat.c
@@ -408,26 +408,25 @@ int yaffs_TagsCompatabilityWriteChunkWit
 
 	yaffs_SpareInitialise(&spare);
 
-	if (eTags->chunkDeleted) {
+	if (eTags->chunkDeleted)
 		spare.pageStatus = 0;
-	} else {
+	else {
 		tags.objectId = eTags->objectId;
 		tags.chunkId = eTags->chunkId;
 
 		tags.byteCountLSB = eTags->byteCount & 0x3ff;
 
-		if (dev->nDataBytesPerChunk >= 1024) {
+		if (dev->nDataBytesPerChunk >= 1024)
 			tags.byteCountMSB = (eTags->byteCount >> 10) & 3;
-		} else {
+		else
 			tags.byteCountMSB = 3;
-		}
 
 
 		tags.serialNumber = eTags->serialNumber;
 
-		if (!dev->useNANDECC && data) {
+		if (!dev->useNANDECC && data)
 			yaffs_CalcECC(data, &spare);
-		}
+
 		yaffs_LoadTagsIntoSpare(&spare, &tags);
 
 	}