This patch gets rid of the below message while performing a code analysis with cppcheck.
[dog/farm/farm.c:207] -> [dog/farm/farm.c:218]: (performance) Variable 'ret' is reassigned a value before the old one has been used. Signed-off-by: Ruoyu <[email protected]> --- dog/farm/farm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dog/farm/farm.c b/dog/farm/farm.c index 5d07be9..83c297f 100644 --- a/dog/farm/farm.c +++ b/dog/farm/farm.c @@ -204,7 +204,7 @@ out: static int notify_vdi_add(uint32_t vdi_id, uint8_t nr_copies, uint8_t copy_policy) { - int ret = -1; + int ret; struct sd_req hdr; struct sd_rsp *rsp = (struct sd_rsp *)&hdr; char *buf = NULL; -- 1.8.3.2 -- sheepdog mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/sheepdog
