projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: bt_version_get_extra(): return `NULL` if none instead of empty str.
[babeltrace.git]
/
src
/
lib
/
babeltrace2.c
diff --git
a/src/lib/babeltrace2.c
b/src/lib/babeltrace2.c
index 14572c29d2484131d768c0d5dab614e6c41747f5..8216cd11ad05a29a5baa66f917734eaa0445a639 100644
(file)
--- a/
src/lib/babeltrace2.c
+++ b/
src/lib/babeltrace2.c
@@
-24,6
+24,7
@@
#include <babeltrace2/babeltrace.h>
#include <stdlib.h>
#include <babeltrace2/babeltrace.h>
#include <stdlib.h>
+#include <string.h>
unsigned int bt_version_get_major(void)
{
unsigned int bt_version_get_major(void)
{
@@
-41,5
+42,5
@@
unsigned int bt_version_get_patch(void) {
const char *bt_version_get_extra(void)
{
const char *bt_version_get_extra(void)
{
- return BT_VERSION_EXTRA;
+ return
strlen(BT_VERSION_EXTRA) == 0 ? NULL :
BT_VERSION_EXTRA;
}
}
This page took
0.025699 seconds
and
4
git commands to generate.