ctdb: Fix some clang uninitialized errors
authorVolker Lendecke <vl@samba.org>
Wed, 19 Aug 2015 05:35:32 +0000 (07:35 +0200)
committerRalph Böhme <slow@samba.org>
Wed, 19 Aug 2015 06:17:23 +0000 (08:17 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
ctdb/tools/ctdb.c

index c6da621602031f31e25db4ebf9bc2b65ae938528..1081eeca71536a2feae9240b9060760040f8b46e 100644 (file)
@@ -4914,7 +4914,7 @@ static int control_getreclock(struct ctdb_context *ctdb, int argc, const char **
 static int control_setreclock(struct ctdb_context *ctdb, int argc, const char **argv)
 {
        int ret;
-       const char *reclock;
+       const char *reclock = NULL;
 
        if (argc == 0) {
                reclock = NULL;
@@ -4938,7 +4938,7 @@ static int control_setreclock(struct ctdb_context *ctdb, int argc, const char **
 static int control_setnatgwstate(struct ctdb_context *ctdb, int argc, const char **argv)
 {
        int ret;
-       uint32_t natgwstate;
+       uint32_t natgwstate = 0;
 
        if (argc == 0) {
                usage();
@@ -4967,7 +4967,7 @@ static int control_setnatgwstate(struct ctdb_context *ctdb, int argc, const char
 static int control_setlmasterrole(struct ctdb_context *ctdb, int argc, const char **argv)
 {
        int ret;
-       uint32_t lmasterrole;
+       uint32_t lmasterrole = 0;
 
        if (argc == 0) {
                usage();
@@ -4996,7 +4996,7 @@ static int control_setlmasterrole(struct ctdb_context *ctdb, int argc, const cha
 static int control_setrecmasterrole(struct ctdb_context *ctdb, int argc, const char **argv)
 {
        int ret;
-       uint32_t recmasterrole;
+       uint32_t recmasterrole = 0;
 
        if (argc == 0) {
                usage();