]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Assign instead of compare 16653/head
authoramitkuma <amitkuma@redhat.com>
Fri, 28 Jul 2017 18:44:29 +0000 (00:14 +0530)
committeramitkuma <amitkuma@redhat.com>
Fri, 28 Jul 2017 18:44:29 +0000 (00:14 +0530)
Fixed:

** CID 1409697 (#1 of 1): Assign instead of compare (PW.ASSIGN_WHERE_COMPARE_MEANT)
1. assign_where_compare_meant: use of "=" where "==" may have been intended
2. primary_file: During compilation of file '/src/rgw/librgw.cc'

Signed-off-by: Amit Kumar amitkuma@redhat.com
src/rgw/rgw_iam_policy.h

index 55f420f0ae70c891a0abdb6bcfcf6bcfa26d79d8..aa121f5d0add7007010ed671d93a30c8d0ce6471 100644 (file)
@@ -323,7 +323,7 @@ struct Condition {
     try {
       double d = std::stod(s, &p);
       if (p == s.length()) {
-       return !((d == +0.0) || (d = -0.0) || std::isnan(d));
+       return !((d == +0.0) || (d == -0.0) || std::isnan(d));
       }
     } catch (const std::logic_error& e) {
       // Fallthrough