aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/ref.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/ref.c')
-rw-r--r--net/tipc/ref.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/tipc/ref.c b/net/tipc/ref.c
index 5a13c2defe4a..33bbf5095094 100644
--- a/net/tipc/ref.c
+++ b/net/tipc/ref.c
@@ -61,7 +61,7 @@
61 * because entry 0's reference field has the form XXXX|1--1. 61 * because entry 0's reference field has the form XXXX|1--1.
62 */ 62 */
63 63
64struct ref_table tipc_ref_table = { 0 }; 64struct ref_table tipc_ref_table = { NULL };
65 65
66static rwlock_t ref_table_lock = RW_LOCK_UNLOCKED; 66static rwlock_t ref_table_lock = RW_LOCK_UNLOCKED;
67 67
@@ -86,7 +86,7 @@ int tipc_ref_table_init(u32 requested_size, u32 start)
86 write_lock_bh(&ref_table_lock); 86 write_lock_bh(&ref_table_lock);
87 index_mask = sz - 1; 87 index_mask = sz - 1;
88 for (i = sz - 1; i >= 0; i--) { 88 for (i = sz - 1; i >= 0; i--) {
89 table[i].object = 0; 89 table[i].object = NULL;
90 table[i].lock = SPIN_LOCK_UNLOCKED; 90 table[i].lock = SPIN_LOCK_UNLOCKED;
91 table[i].data.next_plus_upper = (start & ~index_mask) + i - 1; 91 table[i].data.next_plus_upper = (start & ~index_mask) + i - 1;
92 } 92 }
@@ -108,7 +108,7 @@ void tipc_ref_table_stop(void)
108 return; 108 return;
109 109
110 vfree(tipc_ref_table.entries); 110 vfree(tipc_ref_table.entries);
111 tipc_ref_table.entries = 0; 111 tipc_ref_table.entries = NULL;
112} 112}
113 113
114/** 114/**
@@ -173,7 +173,7 @@ void tipc_ref_discard(u32 ref)
173 assert(entry->data.reference == ref); 173 assert(entry->data.reference == ref);
174 174
175 /* mark entry as unused */ 175 /* mark entry as unused */
176 entry->object = 0; 176 entry->object = NULL;
177 if (tipc_ref_table.first_free == 0) 177 if (tipc_ref_table.first_free == 0)
178 tipc_ref_table.first_free = index; 178 tipc_ref_table.first_free = index;
179 else 179 else