jeyzu pushed a commit to branch master.
commit 6667acf5a2ec29cac87d4ad6656b5e9327457b86
Author: Jérémy Zurcher <[email protected]>
Date: Fri May 17 11:39:01 2013 +0200
eo ptr ind: fix comments
---
src/lib/eo/eo_ptr_indirection.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/lib/eo/eo_ptr_indirection.c b/src/lib/eo/eo_ptr_indirection.c
index 4dc768b..3bb28c1 100644
--- a/src/lib/eo/eo_ptr_indirection.c
+++ b/src/lib/eo/eo_ptr_indirection.c
@@ -262,7 +262,7 @@ _eo_obj_pointer_get(const Eo_Id obj_id)
EO_DECOMPOSE_ID(obj_id, mid_table_id, table_id, entry_id, generation);
- /* Checking the validity of the entry */
+ /* Check the validity of the entry */
if (_eo_ids_tables[mid_table_id] && TABLE_FROM_IDS)
{
entry = &(TABLE_FROM_IDS->entries[entry_id]);
@@ -336,9 +336,10 @@ _search_tables()
}
else
{
- /* Allocate a new one and reserve the first entry */
+ /* Allocate a new table */
table = _eo_id_mem_calloc(1, sizeof(_Eo_Ids_Table));
}
+ /* Initialize the table and reserve the first entry */
table->start = 1;
table->free_entries = MAX_ENTRY_ID - 1;
table->fifo_head = table->fifo_tail = -1;
@@ -385,7 +386,7 @@ _eo_id_allocate(const _Eo *obj)
_eo_generation_counter++;
if (_eo_generation_counter == MAX_GENERATIONS)
_eo_generation_counter = 1;
- /* An entry was found - fill it */
+ /* Fill the entry and return it's Eo Id */
entry->ptr = (_Eo *)obj;
entry->active = 1;
entry->generation = _eo_generation_counter;
@@ -408,7 +409,7 @@ _eo_id_release(const Eo_Id obj_id)
Table_Index mid_table_id, table_id, entry_id;
EO_DECOMPOSE_ID(obj_id, mid_table_id, table_id, entry_id, generation);
- /* Checking the validity of the entry */
+ /* Check the validity of the entry */
if (_eo_ids_tables[mid_table_id] && (table = TABLE_FROM_IDS))
{
entry = &(table->entries[entry_id]);
--
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d