[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] tools/libx{l, c}: Fix trivial Coverity defects in migration v2 code
commit 6094fe493701095414108ead0f100b18af1ccd04 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Mon Jul 20 11:37:59 2015 +0100 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Tue Jul 28 11:11:59 2015 +0100 tools/libx{l, c}: Fix trivial Coverity defects in migration v2 code All of these are UNUSED_VALUE defects where a default value is unconditionally overwritten. They are not particularly interesting, bug wise, but keeping these defects at bay helps prevent real bugs going unnoticed in the volume. No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx> CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> CC: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/libxc/xc_sr_save.c | 10 +++++----- tools/libxl/libxl_stream_read.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/libxc/xc_sr_save.c b/tools/libxc/xc_sr_save.c index cd2be47..58667af 100644 --- a/tools/libxc/xc_sr_save.c +++ b/tools/libxc/xc_sr_save.c @@ -474,7 +474,7 @@ static int send_memory_live(struct xc_sr_context *ctx) xc_shadow_op_stats_t stats = { 0, ctx->save.p2m_size }; char *progress_str = NULL; unsigned x; - int rc = -1; + int rc; rc = update_progress_string(ctx, &progress_str, 0); if ( rc ) @@ -526,7 +526,7 @@ static int suspend_and_send_dirty(struct xc_sr_context *ctx) xc_interface *xch = ctx->xch; xc_shadow_op_stats_t stats = { 0, ctx->save.p2m_size }; char *progress_str = NULL; - int rc = -1; + int rc; DECLARE_HYPERCALL_BUFFER_SHADOW(unsigned long, dirty_bitmap, &ctx->save.dirty_bitmap_hbuf); @@ -573,7 +573,7 @@ static int send_memory_verify(struct xc_sr_context *ctx) { xc_interface *xch = ctx->xch; xc_shadow_op_stats_t stats = { 0, ctx->save.p2m_size }; - int rc = -1; + int rc; struct xc_sr_record rec = { .type = REC_TYPE_VERIFY, @@ -613,7 +613,7 @@ static int send_memory_verify(struct xc_sr_context *ctx) */ static int send_domain_memory_live(struct xc_sr_context *ctx) { - int rc = -1; + int rc; rc = enable_logdirty(ctx); if ( rc ) @@ -653,7 +653,7 @@ static int send_domain_memory_checkpointed(struct xc_sr_context *ctx) static int send_domain_memory_nonlive(struct xc_sr_context *ctx) { xc_interface *xch = ctx->xch; - int rc = -1; + int rc; rc = suspend_domain(ctx); if ( rc ) diff --git a/tools/libxl/libxl_stream_read.c b/tools/libxl/libxl_stream_read.c index 56637e2..7702b3f 100644 --- a/tools/libxl/libxl_stream_read.c +++ b/tools/libxl/libxl_stream_read.c @@ -584,7 +584,7 @@ static void write_emulator_blob(libxl__egc *egc, libxl__sr_emulator_hdr *emu_hdr; STATE_AO_GC(stream->ao); char path[256]; - int rc = 0, writefd = -1; + int rc = 0, writefd; if (rec->hdr.length < sizeof(*emu_hdr)) { rc = ERROR_FAIL; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |