#include <inttypes.h>
#include <babeltrace2/babeltrace.h>
#include "common/common.h"
-#include <popt.h>
#include <glib.h>
#include <sys/types.h>
#include "babeltrace2-cfg.h"
g_string_append_printf(state->ini_error, "Expecting %s:\n", expecting);
/* Only append error if there's one line */
- if (strchr(state->arg, '\n') != NULL || strlen(state->arg) == 0) {
+ if (strchr(state->arg, '\n') || strlen(state->arg) == 0) {
return;
}
goto end;
}
- value = bt_value_unsigned_integer_create_init(
+ value = bt_value_integer_unsigned_create_init(
state->scanner->value.v_int64);
end:
"Integer value -%" PRIu64 " is outside the range of a 64-bit signed integer\n",
int_val);
} else {
- value = bt_value_signed_integer_create_init(
+ value = bt_value_integer_signed_create_init(
-((int64_t) int_val));
}
int_val);
goto end;
} else {
- value = bt_value_signed_integer_create_init(
+ value = bt_value_integer_signed_create_init(
(int64_t) int_val);
}
if (strcmp(id, "null") == 0 || strcmp(id, "NULL") == 0 ||
strcmp(id, "nul") == 0) {
value = bt_value_null;
+ bt_value_get_ref(value);
} else if (strcmp(id, "true") == 0 || strcmp(id, "TRUE") == 0 ||
strcmp(id, "yes") == 0 ||
strcmp(id, "YES") == 0) {