[Ocfs2-commits] mfasheh commits r1908 - trunk/fs/ocfs2

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Feb 22 23:12:16 CST 2005


Author: mfasheh
Signed-off-by: zab
Date: 2005-02-22 23:12:14 -0600 (Tue, 22 Feb 2005)
New Revision: 1908

Modified:
   trunk/fs/ocfs2/vote.c
Log:
* duh, a better way to check vote requests. thanks to zab for pointing
  that one out to me :)

Signed-off-by: zab



Modified: trunk/fs/ocfs2/vote.c
===================================================================
--- trunk/fs/ocfs2/vote.c	2005-02-23 03:12:09 UTC (rev 1907)
+++ trunk/fs/ocfs2/vote.c	2005-02-23 05:12:14 UTC (rev 1908)
@@ -97,12 +97,8 @@
 
 static inline int ocfs2_is_valid_vote_request(int request)
 {
-	int i;
-
-	for(i = OCFS2_VOTE_REQ_INVALID + 1; i < OCFS2_VOTE_REQ_LAST; i++)
-		if (i == request)
-			return 1;
-	return 0;
+	return OCFS2_VOTE_REQ_INVALID < request &&
+		request < OCFS2_VOTE_REQ_LAST;
 }
 
 typedef struct _ocfs2_net_wait_ctxt {



More information about the Ocfs2-commits mailing list