From 8aef681efb3561e9aee0110f252bec003dcd3ac7 Mon Sep 17 00:00:00 2001 From: oetiker Date: Sun, 17 Sep 2006 21:08:29 +0000 Subject: [PATCH] make mvs stop complaining about uninitialized variables ... -- norman wheeler bigpond.com git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@897 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_update.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rrd_update.c b/src/rrd_update.c index 03da914..560ba76 100644 --- a/src/rrd_update.c +++ b/src/rrd_update.c @@ -119,6 +119,7 @@ info_t *rrd_update_v(int argc, char **argv) char *tmplt = NULL; info_t *result = NULL; infoval rc; + rc.u_int = -1; optind = 0; opterr = 0; /* initialize getopt */ while (1) { @@ -142,7 +143,6 @@ info_t *rrd_update_v(int argc, char **argv) case '?': rrd_set_error("unknown option '%s'",argv[optind-1]); - rc.u_int = -1; goto end_tag; } } @@ -150,9 +150,9 @@ info_t *rrd_update_v(int argc, char **argv) /* need at least 2 arguments: filename, data. */ if (argc-optind < 2) { rrd_set_error("Not enough arguments"); - rc.u_int = -1; goto end_tag; } + rc.u_int = 0; result = info_push(NULL,sprintf_alloc("return_value"),RD_I_INT,rc); rc.u_int = _rrd_update(argv[optind], tmplt, argc - optind - 1, argv + optind + 1, result); -- 2.30.2