Skip to content

Commit

Permalink
lib: Make `bt_version_get_*() return unsigned int
Browse files Browse the repository at this point in the history
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I153fb51c5065e672f4ffe05513151238944fb565
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2311
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
  • Loading branch information
frdeso committed Oct 31, 2019
1 parent eb171ee commit 78deb91
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions include/babeltrace2/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
extern "C" {
#endif

extern int bt_version_get_major(void);
extern int bt_version_get_minor(void);
extern int bt_version_get_patch(void);
extern unsigned int bt_version_get_major(void);
extern unsigned int bt_version_get_minor(void);
extern unsigned int bt_version_get_patch(void);
extern const char *bt_version_get_extra(void);

#ifdef __cplusplus
Expand Down
6 changes: 3 additions & 3 deletions src/lib/babeltrace2.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
#include <babeltrace2/babeltrace.h>
#include <stdlib.h>

int bt_version_get_major(void)
unsigned int bt_version_get_major(void)
{
return BT_VERSION_MAJOR;
}

int bt_version_get_minor(void)
unsigned int bt_version_get_minor(void)
{
return BT_VERSION_MINOR;
}

int bt_version_get_patch(void) {
unsigned int bt_version_get_patch(void) {
return BT_VERSION_PATCH;
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib/logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ void __attribute__((constructor)) bt_logging_ctor(void)

bt_logging_set_global_level(
bt_log_get_level_from_env("LIBBABELTRACE2_INIT_LOG_LEVEL"));
BT_LOGI("Babeltrace %d.%d.%d%s library loaded: "
"major=%d, minor=%d, patch=%d, extra=\"%s\"",
BT_LOGI("Babeltrace %u.%u.%u%s library loaded: "
"major=%u, minor=%u, patch=%u, extra=\"%s\"",
bt_version_get_major(), bt_version_get_minor(),
bt_version_get_patch(), v_extra,
bt_version_get_major(), bt_version_get_minor(),
Expand Down

0 comments on commit 78deb91

Please sign in to comment.