X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Frrd_tune.c;h=160b32a5e66a961845e9655e98e77018cca59a68;hb=51fcea2cbf9721f012f2f0d43c604a3aaf684ee8;hp=91f6409ada384e79093e9ea28d20b90ff92284ce;hpb=7f30ee2ae089520606cbb7e38fab9981618771f5;p=rrdtool.git diff --git a/src/rrd_tune.c b/src/rrd_tune.c index 91f6409..160b32a 100644 --- a/src/rrd_tune.c +++ b/src/rrd_tune.c @@ -237,14 +237,20 @@ int rrd_tune( break; case 'x': if (set_hwarg(&rrd, CF_HWPREDICT, RRA_hw_alpha, optarg)) { - rrd_free(&rrd); - return -1; + if (set_hwarg(&rrd, CF_MHWPREDICT, RRA_hw_alpha, optarg)) { + rrd_free(&rrd); + return -1; + } + rrd_clear_error(); } break; case 'y': if (set_hwarg(&rrd, CF_HWPREDICT, RRA_hw_beta, optarg)) { - rrd_free(&rrd); - return -1; + if (set_hwarg(&rrd, CF_MHWPREDICT, RRA_hw_beta, optarg)) { + rrd_free(&rrd); + return -1; + } + rrd_clear_error(); } break; case 'z':