]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix error code return from class methods
authorSage Weil <sage.weil@dreamhost.com>
Sat, 31 Mar 2012 03:18:42 +0000 (20:18 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Sat, 31 Mar 2012 03:18:55 +0000 (20:18 -0700)
Don't shadow the result at function scope.

Fixes: #2148
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/osd/ReplicatedPG.cc

index b2e2a37325369b19e85f9eec86d9f84b8bce0edc..96d1a7a479df3e23d99a00932fde142da7568795 100644 (file)
@@ -1728,8 +1728,8 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops)
        bp.copy(op.cls.indata_len, indata);
 
        ClassHandler::ClassData *cls;
-       int result = osd->class_handler->open_class(cname, &cls);
-       assert(result == 0);
+       result = osd->class_handler->open_class(cname, &cls);
+       assert(result == 0);   // init_op_flags() already verified this works.
 
        ClassHandler::ClassMethod *method = cls->get_method(mname.c_str());
        if (!method) {