[sheepdog] [PATCH 2/2] sheep: correct join_message->nr_nodes type

Liu Yuan namei.unix at gmail.com
Tue Sep 11 10:17:11 CEST 2012


From: Liu Yuan <tailai.ly at taobao.com>

In send_join_request() we use -1 to check if the epoch read error happens.
So we should change uint16_t to int16_t.

Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
 include/internal_proto.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/internal_proto.h b/include/internal_proto.h
index ec27cfc..f6253b6 100644
--- a/include/internal_proto.h
+++ b/include/internal_proto.h
@@ -195,7 +195,7 @@ struct epoch_log {
 struct join_message {
 	uint8_t proto_ver;
 	uint8_t nr_copies;
-	uint16_t nr_nodes;
+	int16_t nr_nodes;
 	uint16_t nr_failed_nodes;
 	uint16_t nr_delayed_nodes;
 	uint16_t cluster_flags;
-- 
1.7.10.2




More information about the sheepdog mailing list