projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Extend test_bitfield coverage
[babeltrace.git]
/
cli
/
babeltrace-cfg.c
diff --git
a/cli/babeltrace-cfg.c
b/cli/babeltrace-cfg.c
index 021cca490b92cc22baa1b33465c28033885eceaa..1205b21d88579d9bcad3b25ed07089cf395e367d 100644
(file)
--- a/
cli/babeltrace-cfg.c
+++ b/
cli/babeltrace-cfg.c
@@
-23,7
+23,7
@@
*/
#include <babeltrace/common-internal.h>
*/
#include <babeltrace/common-internal.h>
-#include <babeltrace/
values
.h>
+#include <babeltrace/
babeltrace
.h>
#include <glib.h>
#include "babeltrace-cfg.h"
#include <glib.h>
#include "babeltrace-cfg.h"
@@
-37,34
+37,38
@@
void destroy_gstring(void *data)
* Extracts the various paths from the string arg, delimited by ':',
* and appends them to the array value object plugin_paths.
*/
* Extracts the various paths from the string arg, delimited by ':',
* and appends them to the array value object plugin_paths.
*/
-
enum bt_value_status
bt_config_append_plugin_paths(
-
struct
bt_value *plugin_paths, const char *arg)
+
int
bt_config_append_plugin_paths(
+ bt_value *plugin_paths, const char *arg)
{
{
-
enum bt_value_status status = BT_VALUE_STATUS_OK
;
+
int ret = 0
;
GPtrArray *dirs = g_ptr_array_new_with_free_func(destroy_gstring);
GPtrArray *dirs = g_ptr_array_new_with_free_func(destroy_gstring);
- int ret;
size_t i;
if (!dirs) {
size_t i;
if (!dirs) {
-
status = BT_VALUE_STATUS_ERROR
;
+
ret = -1
;
goto end;
}
ret = bt_common_append_plugin_path_dirs(arg, dirs);
if (ret) {
goto end;
}
ret = bt_common_append_plugin_path_dirs(arg, dirs);
if (ret) {
-
status = BT_VALUE_STATUS_ERROR
;
+
ret = -1
;
goto end;
}
for (i = 0; i < dirs->len; i++) {
GString *dir = g_ptr_array_index(dirs, i);
goto end;
}
for (i = 0; i < dirs->len; i++) {
GString *dir = g_ptr_array_index(dirs, i);
- bt_value_array_append_string(plugin_paths, dir->str);
+ ret = bt_value_array_append_string_element(
+ plugin_paths, dir->str);
+ if (ret != BT_VALUE_STATUS_OK) {
+ ret = -1;
+ goto end;
+ }
}
end:
g_ptr_array_free(dirs, TRUE);
}
end:
g_ptr_array_free(dirs, TRUE);
- return
status
;
+ return
ret
;
}
void bt_config_connection_destroy(struct bt_config_connection *connection)
}
void bt_config_connection_destroy(struct bt_config_connection *connection)
This page took
0.031415 seconds
and
4
git commands to generate.