[Ocfs2-commits] jlbec commits r907 - trunk/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Fri May 7 20:22:25 CDT 2004


Author: jlbec
Date: 2004-05-07 19:22:23 -0500 (Fri, 07 May 2004)
New Revision: 907

Modified:
   trunk/src/dir.c
   trunk/src/extmap.c
   trunk/src/oin.c
   trunk/src/vote.c
Log:

Clean up some b[Rr]et and Ret variables.



Modified: trunk/src/dir.c
===================================================================
--- trunk/src/dir.c	2004-05-07 22:37:57 UTC (rev 906)
+++ trunk/src/dir.c	2004-05-08 00:22:23 UTC (rev 907)
@@ -354,7 +354,7 @@
 	__u32 i;
 	ocfs_file_entry *fe;
 	int status;
-	int bRet = 0;
+	int ret = 0;
 	ocfs_dir_node * DirNode = NULL, *tmp;
 
 	LOG_ENTRY ();
@@ -362,7 +362,7 @@
 	DirNode = (ocfs_dir_node *) ocfs_malloc(512);
 	if (DirNode == NULL) {
 		LOG_ERROR_STR("Out of memory");
-		bRet = 0;
+		ret = 0;
 		goto bail;
 	}
 
@@ -378,7 +378,7 @@
 
 	if (!IS_VALID_DIR_NODE (DirNode)) {
 		LOG_TRACE_STR("Invalid Dir Node!\n");
-		bRet = 0;
+		ret = 0;
 		goto bail;
 	}
 
@@ -413,7 +413,7 @@
 					OFile->curr_dir_off = DirNode->node_disk_off;
 					OFile->curr_byte_off = i + 1;
 				}
-				bRet = 1;
+				ret = 1;
 				goto bail;
 			} else
 				break;
@@ -431,7 +431,7 @@
 			status = ocfs_read_dirnode(osb, next, sync, bhs, dir_inode);
 			if (status < 0) {
 				LOG_ERROR_STR("failed to read directory");
-				bRet = 0;
+				ret = 0;
 				goto bail;
 			}
 
@@ -441,7 +441,7 @@
 
 			if (!IS_VALID_DIR_NODE (DirNode)) {
 				LOG_TRACE_STR("Invalid Dir Node!\n");
-				bRet = 0;
+				ret = 0;
 				goto bail;
 			}
 			start = 0;
@@ -461,8 +461,8 @@
 	if (DirNode)
 		ocfs_safefree(DirNode);
 
-	LOG_EXIT_INT (bRet);
-	return bRet;
+	LOG_EXIT_INT (ret);
+	return ret;
 }				/* ocfs_search_dir_node */
 
 

Modified: trunk/src/extmap.c
===================================================================
--- trunk/src/extmap.c	2004-05-07 22:37:57 UTC (rev 906)
+++ trunk/src/extmap.c	2004-05-08 00:22:23 UTC (rev 907)
@@ -576,13 +576,12 @@
  */
 int ocfs_update_extent_map (ocfs_super * osb, ocfs_extent_map * Map, void *Buffer, __s64 * localVbo, __u64 * remainingLength, ocfs_ext_flag Flag)
 {
-	int status = -EFAIL;
+	int ret = -EFAIL;
 	ocfs_file_entry *FileEntry;
 	ocfs_extent_group *OcfsExtent;
 	__s64 tempVbo;
 	__s64 tempLbo;
 	__u64 tempSize;
-	int Ret;
 	int j;
 
 	LOG_ENTRY ();
@@ -598,15 +597,15 @@
 			tempSize = FileEntry->extents[j].num_bytes;
 
 			/* Add the Extent to extent map list */
-			Ret =
+			ret =
 			    ocfs_add_extent_map_entry (osb, Map, tempVbo, tempLbo,
 						   tempSize);
-			if (!Ret) {
-				LOG_ERROR_STATUS (status = -ENOMEM);
+			if (!ret) {
+				LOG_ERROR_STATUS (ret = -ENOMEM);
 				goto bail;
 			}
 		}
-		status = 0;
+		ret = 0;
 	} else {
 		__u64 localLength = 0;
 
@@ -621,12 +620,12 @@
 				tempSize = OcfsExtent->extents[j].num_bytes;
 
 				/* Add the Extent to extent map list */
-				Ret =
+				ret =
 				    ocfs_add_extent_map_entry (osb, Map, tempVbo,
 							   tempLbo,
 							   (__u32) tempSize);
-				if (!Ret) {
-					LOG_ERROR_STATUS (status = -ENOMEM);
+				if (!ret) {
+					LOG_ERROR_STATUS (ret = -ENOMEM);
 					goto bail;
 				}
 
@@ -637,7 +636,7 @@
 				/* more Entries to the extent map list */
 				if (localLength >= (*remainingLength)) {
 					(*remainingLength) = 0;
-					status = 0;
+					ret = 0;
 					goto bail;
 				} else {
 					(*remainingLength) -= localLength;
@@ -651,12 +650,12 @@
 			LOG_ERROR_ARGS ("next_free_extent=%d, rem_len=%llu",
 				OcfsExtent->next_free_ext, *remainingLength);
 		} else
-			status = 0;
+			ret = 0;
 	}
 
 bail:
-	LOG_EXIT_STATUS (status);
-	return status;
+	LOG_EXIT_STATUS (ret);
+	return ret;
 }				/* ocfs_update_extent_map */
 
 /*

Modified: trunk/src/oin.c
===================================================================
--- trunk/src/oin.c	2004-05-07 22:37:57 UTC (rev 906)
+++ trunk/src/oin.c	2004-05-08 00:22:23 UTC (rev 907)
@@ -313,7 +313,7 @@
  */
 int ocfs_inode_fill_ext_map(ocfs_super * osb, struct buffer_head * fe_bh, struct inode *inode)
 {
-	int status = 0;
+	int ret = 0;
 	int j;
 	__s64 tempVbo;
 	__s64 tempLbo;
@@ -321,7 +321,6 @@
 	__u64 tempoff;
 	ocfs_extent_group *extent = NULL;
 	struct buffer_head *extent_bh = NULL;
-	int bRet;
 	ocfs_file_entry *fe = NULL;
 	void *tmp;
 
@@ -332,7 +331,7 @@
 	/* ocfs_create_new_oin will deadlock if fe_bh is locked */
 	fe = ocfs_allocate_file_entry();
 	if (fe == NULL) {
-		LOG_ERROR_STATUS(status = -ENOMEM);
+		LOG_ERROR_STATUS(ret = -ENOMEM);
 		goto leave;
 	}
 	tmp = OCFS_BH_GET_DATA_READ(fe_bh); /* read */
@@ -351,13 +350,13 @@
 			tempSize = fe->extents[j].num_bytes;
 			
 			/* Add the Extent to extent map */
-			bRet = ocfs_add_extent_map_entry (osb, 
-							  &OCFS_I(inode)->map,
+			ret = ocfs_add_extent_map_entry (osb, 
+							 &OCFS_I(inode)->map,
 							  tempVbo, 
 							  tempLbo, 
 							  tempSize);
-			if (!bRet) {
-				LOG_ERROR_STATUS (status = -ENOMEM);
+			if (!ret) {
+				LOG_ERROR_STATUS (ret = -ENOMEM);
 				goto leave;
 			}
 		}
@@ -367,9 +366,9 @@
 		/* Extents are branched and we are no longer using */
 		/* Local Extents for this File Entry. */
 		
-		status = ocfs_get_leaf_extent (osb, fe, 0, &extent_bh, inode);
-		if (status < 0) {
-			LOG_ERROR_STATUS (status);
+		ret = ocfs_get_leaf_extent (osb, fe, 0, &extent_bh, inode);
+		if (ret < 0) {
+			LOG_ERROR_STATUS (ret);
 			goto leave;
 		}
 		
@@ -377,7 +376,7 @@
 			extent = (ocfs_extent_group *) OCFS_BH_GET_DATA_READ(extent_bh); /* read */
 			
 			if (!IS_VALID_EXTENT_DATA (extent)) {
-				LOG_ERROR_STATUS(status = -EFAIL);
+				LOG_ERROR_STATUS(ret = -EFAIL);
 				goto leave;
 			}
 			
@@ -387,14 +386,13 @@
 				tempSize = extent->extents[j].num_bytes;
 				
 				/* Add the Extent to extent map */
-				bRet =
-					ocfs_add_extent_map_entry (osb,
-								   &OCFS_I(inode)->map,
-								   tempVbo,
-								   tempLbo,
-								   tempSize);
-				if (!bRet) {
-					LOG_ERROR_STATUS (status =
+				ret = ocfs_add_extent_map_entry (osb,
+								 &OCFS_I(inode)->map,
+								 tempVbo,
+								 tempLbo,
+								 tempSize);
+				if (!ret) {
+					LOG_ERROR_STATUS (ret =
 							  -ENOMEM);
 					goto leave;
 				}
@@ -402,7 +400,7 @@
 			
 			if (extent->next_data_ext > 0) {
 				if (!extent->next_data_ext) {
-					LOG_ERROR_STATUS (status = -EFAIL);
+					LOG_ERROR_STATUS (ret = -EFAIL);
 					goto leave;
 				}
 				next_data_ext = extent->next_data_ext;
@@ -410,12 +408,12 @@
 				extent = NULL;
 				extent_bh = NULL;
 
-				status = ocfs_read_bh(osb, 
-						      next_data_ext, 
-						      &extent_bh, 
-						      OCFS_BH_COND_CACHED, inode);
-				if (status < 0) {
-					LOG_ERROR_STATUS (status);
+				ret = ocfs_read_bh(osb, 
+						   next_data_ext, 
+						   &extent_bh, 
+						   OCFS_BH_COND_CACHED, inode);
+				if (ret < 0) {
+					LOG_ERROR_STATUS(ret);
 					goto leave;
 				}
 			} else
@@ -434,6 +432,6 @@
 		brelse(extent_bh);
 	}
 
-	LOG_EXIT_STATUS (status);
-	return status;
+	LOG_EXIT_STATUS (ret);
+	return ret;
 }				/* ocfs_inode_fill_ext_map */

Modified: trunk/src/vote.c
===================================================================
--- trunk/src/vote.c	2004-05-07 22:37:57 UTC (rev 906)
+++ trunk/src/vote.c	2004-05-08 00:22:23 UTC (rev 907)
@@ -334,7 +334,7 @@
  */
 int ocfs_check_ipc_msg (__u8 * msg, __u32 msg_len)
 {
-	int bret = 0;
+	int ret = 0;
 	ocfs_dlm_msg *dlm_msg;
 
 	LOG_ENTRY ();
@@ -366,11 +366,11 @@
 		goto bail;
 	}
 
-	bret = 1;
+	ret = 1;
 
 bail:
-	LOG_EXIT_INT (bret);
-	return bret;
+	LOG_EXIT_INT (ret);
+	return ret;
 }				/* ocfs_check_ipc_msg */
 
 



More information about the Ocfs2-commits mailing list