Rev 605: fixed a pointer cast warning in http://samba.org/~tridge/ctdb

tridge at samba.org tridge at samba.org
Mon Sep 10 05:16:19 GMT 2007


------------------------------------------------------------
revno: 605
revision-id: tridge at samba.org-20070910051617-jukrt35ok0rcdtht
parent: tridge at samba.org-20070910050928-p53glulwuefby7qi
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge.test
timestamp: Mon 2007-09-10 15:16:17 +1000
message:
  fixed a pointer cast warning
modified:
  client/ctdb_client.c           ctdb_client.c-20070411010216-3kd8v37k61steeya-1
  server/ctdb_serverids.c        ctdb_serverids.c-20070824054041-oco3oebinbft02fl-1
=== modified file 'client/ctdb_client.c'
--- a/client/ctdb_client.c	2007-09-05 04:59:29 +0000
+++ b/client/ctdb_client.c	2007-09-10 05:16:17 +0000
@@ -2379,6 +2379,8 @@
 
 /*
   check if a server id exists
+
+  if a server id does exist, return *status == 1, otherwise *status == 0
  */
 int ctdb_ctrl_check_server_id(struct ctdb_context *ctdb, 
 		      struct timeval timeout, 

=== modified file 'server/ctdb_serverids.c'
--- a/server/ctdb_serverids.c	2007-09-04 00:21:51 +0000
+++ b/server/ctdb_serverids.c	2007-09-10 05:16:17 +0000
@@ -92,9 +92,9 @@
 {
 	struct ctdb_server_id *server_id = (struct ctdb_server_id *)indata.dptr;
 
-	return (int32_t)trbt_lookuparray32(ctdb->server_ids, 
-				SERVER_ID_KEY_SIZE,
-				get_server_id_key(server_id));
+	return trbt_lookuparray32(ctdb->server_ids, 
+				  SERVER_ID_KEY_SIZE,
+				  get_server_id_key(server_id)) == NULL? 0 : 1;
 }
 
 /*



More information about the samba-cvs mailing list