浏览代码

ceph: small cleanup in hash function

Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil 15 年之前
父节点
当前提交
cfea1cf42b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/ceph/ceph_hash.c

+ 1 - 1
fs/ceph/ceph_hash.c

@@ -85,7 +85,7 @@ unsigned ceph_str_hash_linux(const char *str, unsigned length)
         unsigned long hash = 0;
         unsigned long hash = 0;
 	unsigned char c;
 	unsigned char c;
 
 
-        while (length-- > 0) {
+        while (length--) {
 		c = *str++;
 		c = *str++;
 		hash = (hash + (c << 4) + (c >> 4)) * 11;
 		hash = (hash + (c << 4) + (c >> 4)) * 11;
 	}
 	}