From: Liu Yuan <[email protected]>

This code is never visited and acted as a safe guard, but the
uppper layer code should take responsibility of initializing
hdr->copies to avoid this redundant check in the hot path.

Signed-off-by: Liu Yuan <[email protected]>
---
 sheep/store.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/sheep/store.c b/sheep/store.c
index 9f8a2c6..0a1932d 100644
--- a/sheep/store.c
+++ b/sheep/store.c
@@ -645,11 +645,6 @@ int store_create_and_write_obj(const struct sd_req *req, 
struct sd_rsp *rsp, voi
        char *buf = NULL;
        struct siocb iocb;
 
-       if (!hdr->copies) {
-               eprintf("the number of copies cannot be zero\n");
-               return SD_RES_INVALID_PARMS;
-       }
-
        memset(&iocb, 0, sizeof(iocb));
        iocb.epoch = epoch;
        iocb.flags = hdr->flags;
-- 
1.7.8.2

-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to