summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 50f6f94)
raw | patch | inline | side by side (parent: 50f6f94)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 17 Sep 2006 21:08:29 +0000 (21:08 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 17 Sep 2006 21:08:29 +0000 (21:08 +0000) |
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@897 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_update.c | patch | blob | history |
diff --git a/src/rrd_update.c b/src/rrd_update.c
index 03da914967389ea89a709499429bbc4dd2ee4869..560ba763a2428da587157e07f3d2cf24e2667622 100644 (file)
--- a/src/rrd_update.c
+++ b/src/rrd_update.c
char *tmplt = NULL;
info_t *result = NULL;
infoval rc;
+ rc.u_int = -1;
optind = 0; opterr = 0; /* initialize getopt */
while (1) {
case '?':
rrd_set_error("unknown option '%s'",argv[optind-1]);
- rc.u_int = -1;
goto end_tag;
}
}
/* 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);