]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
scratchtool[pp]: fix rados_conf_set/get test of log_to_stderr
authorSage Weil <sage.weil@dreamhost.com>
Sun, 23 Oct 2011 03:44:05 +0000 (20:44 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Sun, 23 Oct 2011 03:44:05 +0000 (20:44 -0700)
Fix this warning

warning: scratchtool.c:142: comparison with string literal results in unspecified behavior

and flips the logic.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/scratchtool.c
src/scratchtoolpp.cc

index 6022d1e1b015a8aa3cf3aaa78ea9e7baa8ae65cb..e9b52459890823987eff3dab59dfe21c430bd537 100644 (file)
@@ -139,7 +139,7 @@ static int testrados(void)
                printf("error: failed to read log_to_stderr from config\n");
                return 1;
        }
-       if (tmp == "true") {
+       if (strcmp(tmp, "true")) {
                printf("error: new setting for log_to_stderr failed to take effect.\n");
                return 1;
        }
index 98bfd2a1c21a253ef059ec2d43af66e3b822d2ef..01db29e9f2b522b3a6aba14887a1e2a46b892c51 100644 (file)
@@ -73,7 +73,7 @@ int main(int argc, const char **argv)
     printf("error: failed to read log_to_stderr from config\n");
     exit(1);
   }
-  if (tmp == "true") {
+  if (tmp != "true") {
     printf("error: new setting for log_to_stderr failed to take effect.\n");
     exit(1);
   }