Iztok Jeras
2017-07-19 a10c464ba98e980b21185bf084789f6c8df22473
libscpi/src/parser.c
@@ -44,6 +44,7 @@
#include "scpi/error.h"
#include "scpi/constants.h"
#include "scpi/utils.h"
#include "scpi/units.h"
/**
 * Write data to SCPI output
@@ -1282,12 +1283,6 @@
    scpi_parameter_t param;
    int32_t intval;
    scpi_choice_def_t bool_options[] = {
        {"OFF", 0},
        {"ON", 1},
        SCPI_CHOICE_LIST_END /* termination of option list */
    };
    if (!value) {
        SCPI_ErrorPush(context, SCPI_ERROR_SYSTEM_ERROR);
        return FALSE;
@@ -1300,7 +1295,7 @@
            SCPI_ParamToInt32(context, &param, &intval);
            *value = intval ? TRUE : FALSE;
        } else {
            result = SCPI_ParamToChoice(context, &param, bool_options, &intval);
            result = SCPI_ParamToChoice(context, &param, scpi_bool_def, &intval);
            if (result) {
                *value = intval ? TRUE : FALSE;
            }