projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Generate a binary looking for in-tree plug-ins
[babeltrace.git]
/
lib
/
ref.c
diff --git
a/lib/ref.c
b/lib/ref.c
index ac0580137a5ad959d25fbfa29b3a3dc0a7ffae19..4e245adf583092ebcb95edb3b1dfc5dfd692b73f 100644
(file)
--- a/
lib/ref.c
+++ b/
lib/ref.c
@@
-31,11
+31,11
@@
void *bt_get(void *ptr)
{
struct bt_object *obj = ptr;
{
struct bt_object *obj = ptr;
- if (
!obj
) {
+ if (
unlikely(!obj)
) {
goto end;
}
goto end;
}
- if (
obj->parent && bt_object_get_ref_count(obj) == 0
) {
+ if (
unlikely(obj->parent && bt_object_get_ref_count(obj) == 0)
) {
bt_get(obj->parent);
}
bt_ref_get(&obj->ref_count);
bt_get(obj->parent);
}
bt_ref_get(&obj->ref_count);
@@
-47,7
+47,7
@@
void bt_put(void *ptr)
{
struct bt_object *obj = ptr;
{
struct bt_object *obj = ptr;
- if (
!obj
) {
+ if (
unlikely(!obj)
) {
return;
}
return;
}
This page took
0.024263 seconds
and
4
git commands to generate.