debuglevel is a signed int, not usnigned.
authorroot <root@test1n1.VSOFS1.COM>
Fri, 28 Nov 2008 00:29:43 +0000 (11:29 +1100)
committerroot <root@test1n1.VSOFS1.COM>
Fri, 28 Nov 2008 00:29:43 +0000 (11:29 +1100)
tools/ctdb.c

index c4932c24b7abcdc2ec3e8b7416b2270f0e8499fd..63fba20c64c2151473fb4793845050e45243f0b7 100644 (file)
@@ -1845,7 +1845,7 @@ static int control_getdebug(struct ctdb_context *ctdb, int argc, const char **ar
 static int control_setdebug(struct ctdb_context *ctdb, int argc, const char **argv)
 {
        int ret;
-       uint32_t level;
+       int32_t level;
 
        if (argc < 1) {
                usage();
@@ -1854,7 +1854,7 @@ static int control_setdebug(struct ctdb_context *ctdb, int argc, const char **ar
        if (isalpha(argv[0][0])) { 
                level = get_debug_by_desc(argv[0]);
        } else {
-               level = strtoul(argv[0], NULL, 0);
+               level = strtol(argv[0], NULL, 0);
        }
 
        ret = ctdb_ctrl_set_debuglevel(ctdb, options.pnn, level);