Values API: standardize parameters and return values
[babeltrace.git] / lib / lib-logging.c
index 9dd8ae7f4c645510ac1858741b798294fec74855..3eb3f1866745a897b5a795310f1a9a375904280f 100644 (file)
@@ -805,33 +805,29 @@ static inline void format_value(char **buf_ch, bool extended,
        switch (bt_value_get_type(value)) {
        case BT_VALUE_TYPE_BOOL:
        {
-               bt_bool val;
+               bt_bool val = bt_value_bool_get(value);
 
-               (void) bt_value_bool_get(value, &val);
                BUF_APPEND(", %svalue=%d", PRFIELD(val));
                break;
        }
        case BT_VALUE_TYPE_INTEGER:
        {
-               int64_t val;
+               int64_t val = bt_value_integer_get(value);
 
-               (void) bt_value_integer_get(value, &val);
                BUF_APPEND(", %svalue=%" PRId64, PRFIELD(val));
                break;
        }
        case BT_VALUE_TYPE_REAL:
        {
-               double val;
+               double val = bt_value_real_get(value);
 
-               (void) bt_value_real_get(value, &val);
                BUF_APPEND(", %svalue=%f", PRFIELD(val));
                break;
        }
        case BT_VALUE_TYPE_STRING:
        {
-               const char *val;
+               const char *val = bt_value_string_get(value);
 
-               (void) bt_value_string_get(value, &val);
                BUF_APPEND(", %spartial-value=\"%.32s\"", PRFIELD(val));
                break;
        }
This page took 0.024336 seconds and 4 git commands to generate.