projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tap-driver.sh: flush stdout after each test result
[babeltrace.git]
/
plugins
/
ctf
/
common
/
metadata
/
objstack.c
diff --git
a/plugins/ctf/common/metadata/objstack.c
b/plugins/ctf/common/metadata/objstack.c
index 8087722059cd3d28cb66a7241de1ba8d7debca50..2f70380040f6050a8a1c283838c5c65cc8178d73 100644
(file)
--- a/
plugins/ctf/common/metadata/objstack.c
+++ b/
plugins/ctf/common/metadata/objstack.c
@@
-24,10
+24,13
@@
* SOFTWARE.
*/
* SOFTWARE.
*/
+#define BT_LOG_TAG "PLUGIN-CTF-METADATA-OBJSTACK"
+#include "logging.h"
+
#include <stdlib.h>
#include <stdlib.h>
-#include <babeltrace
/list
.h>
-#include <babeltrace/babeltrace-internal.h>
-#include <babeltrace
/align
.h>
+#include <babeltrace
2/list-internal
.h>
+#include <babeltrace
2
/babeltrace-internal.h>
+#include <babeltrace
2/align-internal
.h>
#define OBJSTACK_ALIGN 8 /* Object stack alignment */
#define OBJSTACK_INIT_LEN 128
#define OBJSTACK_ALIGN 8 /* Object stack alignment */
#define OBJSTACK_INIT_LEN 128
@@
-51,11
+54,14
@@
struct objstack *objstack_create(void)
struct objstack_node *node;
objstack = calloc(1, sizeof(*objstack));
struct objstack_node *node;
objstack = calloc(1, sizeof(*objstack));
- if (!objstack)
+ if (!objstack) {
+ BT_LOGE_STR("Failed to allocate one object stack.");
return NULL;
return NULL;
+ }
node = calloc(sizeof(struct objstack_node) + OBJSTACK_INIT_LEN,
sizeof(char));
if (!node) {
node = calloc(sizeof(struct objstack_node) + OBJSTACK_INIT_LEN,
sizeof(char));
if (!node) {
+ BT_LOGE_STR("Failed to allocate one object stack node.");
free(objstack);
return NULL;
}
free(objstack);
return NULL;
}
@@
-107,6
+113,7
@@
struct objstack_node *objstack_append_node(struct objstack *objstack)
new_node = calloc(sizeof(struct objstack_node) + (last_node->len << 1),
sizeof(char));
if (!new_node) {
new_node = calloc(sizeof(struct objstack_node) + (last_node->len << 1),
sizeof(char));
if (!new_node) {
+ BT_LOGE_STR("Failed to allocate one object stack node.");
return NULL;
}
bt_list_add_tail(&new_node->node, &objstack->head);
return NULL;
}
bt_list_add_tail(&new_node->node, &objstack->head);
This page took
0.024605 seconds
and
4
git commands to generate.