[sheepdog] [PATCH] sheep/gateway.c: remove duplicate `if` statement

徐小龙 nxtxiaolong at gmail.com
Wed Dec 17 09:08:47 CET 2014


current gateway.c has duplicate `if` statement,
this patch remove it

Signed-off-by: Xiaolong Xu <nxtxiaolong at gmail.com>
---
 sheep/gateway.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sheep/gateway.c b/sheep/gateway.c
index 7f7d1d1..91bcad2 100644
--- a/sheep/gateway.c
+++ b/sheep/gateway.c
@@ -681,12 +681,11 @@ int gateway_write_obj(struct request *req)
        if (!bypass_object_cache(req))
                return object_cache_handle_request(req);

-       if (is_data_vid_update(hdr))
-               invalidate_other_nodes(oid_to_vid(oid));

        if (is_data_vid_update(hdr)) {
                size_t nr_vids = hdr->data_length / sizeof(*vids);

+               invalidate_other_nodes(oid_to_vid(oid));
                /* read the previous vids to discard their references later
*/
                vids = xzalloc(sizeof(*vids) * nr_vids);
                refs = xzalloc(sizeof(*refs) * nr_vids);
-- 
1.9.1


Thanks
Long
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog/attachments/20141217/523140b3/attachment-0003.html>


More information about the sheepdog mailing list