{
hdb_handle_t handle;
struct object_instance *instance;
- unsigned int res;
+ int res;
res = hdb_handle_create (&object_instance_database,
sizeof (struct object_instance), &handle);
struct object_instance * obj_pt;
struct object_tracker * tracker_pt;
hdb_handle_t obj_handle = object_handle;
- unsigned int res;
do {
- res = hdb_handle_get (&object_instance_database,
- obj_handle, (void *)&obj_pt);
+ if (hdb_handle_get (&object_instance_database,
+ obj_handle, (void *)&obj_pt) != 0) {
+ return;
+ }
for (list = obj_pt->track_head.next;
list != &obj_pt->track_head; list = list->next) {
struct object_instance * obj_pt;
struct object_tracker * tracker_pt;
hdb_handle_t obj_handle = object_handle;
- unsigned int res;
do {
- res = hdb_handle_get (&object_instance_database,
- obj_handle, (void *)&obj_pt);
+ if (hdb_handle_get (&object_instance_database,
+ obj_handle, (void *)&obj_pt) != 0) {
+ return;
+ }
for (list = obj_pt->track_head.next;
list != &obj_pt->track_head; list = list->next) {
struct object_instance * owner_pt = NULL;
struct object_tracker * tracker_pt;
hdb_handle_t obj_handle = object_handle;
- unsigned int res;
do {
- res = hdb_handle_get (&object_instance_database,
- obj_handle, (void *)&obj_pt);
+ if (hdb_handle_get (&object_instance_database,
+ obj_handle, (void *)&obj_pt) != 0) {
+ return;
+ }
if (owner_pt == NULL)
owner_pt = obj_pt;
struct object_instance * obj_pt;
struct object_tracker * tracker_pt;
struct object_tracker * tmptracker_pt;
- unsigned int res;
- res = hdb_handle_get (&object_instance_database,
- OBJECT_PARENT_HANDLE, (void *)&obj_pt);
+ if (hdb_handle_get (&object_instance_database,
+ OBJECT_PARENT_HANDLE, (void *)&obj_pt) != 0) {
+ return;
+ }
/*
* Make a copy of the list
{
struct object_instance *object_instance;
struct object_instance *parent_instance;
- unsigned int res;
+ int res;
int found = 0;
int i;
{
struct object_instance *instance;
struct object_key *object_key;
- unsigned int res;
+ int res;
struct list_head *list;
int found = 0;
int i;
hdb_handle_t object_handle)
{
struct object_instance *instance;
- unsigned int res;
+ int res;
res = hdb_handle_get (&object_instance_database,
object_handle, (void *)&instance);
size_t object_valid_list_entries)
{
struct object_instance *instance;
- unsigned int res;
+ int res;
res = hdb_handle_get (&object_instance_database,
object_handle, (void *)&instance);
size_t object_key_valid_list_entries)
{
struct object_instance *instance;
- unsigned int res;
+ int res;
res = hdb_handle_get (&object_instance_database,
object_handle, (void *)&instance);
size_t object_len,
hdb_handle_t *object_find_handle)
{
- unsigned int res;
+ int res;
struct object_instance *iter_obj_inst;
struct object_instance *object_instance;
struct object_find_instance *object_find_instance;
hdb_handle_t object_find_handle,
hdb_handle_t *object_handle)
{
- unsigned int res;
+ int res;
struct object_find_instance *object_find_instance;
struct object_instance *object_instance = NULL;
- unsigned int found = 0;
+ int found = 0;
size_t pos;
res = hdb_handle_get (&object_find_instance_database,
if (found) {
*object_handle = object_instance->object_handle;
res = 0;
+ } else {
+ res = -1;
}
return (res);
hdb_handle_t object_find_handle)
{
struct object_find_instance *object_find_instance;
- unsigned int res;
+ int res;
res = hdb_handle_get (&object_find_instance_database,
object_find_handle, (void *)&object_find_instance);
size_t *value_len,
objdb_value_types_t * type)
{
- unsigned int res = 0;
+ int res = 0;
struct object_instance *instance;
struct object_key *object_key = NULL;
struct list_head *list;
size_t key_len,
unsigned int *value)
{
- unsigned int res = 0;
+ int res = 0;
struct object_instance *instance;
struct object_key *object_key = NULL;
struct list_head *list;
size_t key_len,
unsigned int *value)
{
- unsigned int res = 0;
+ int res = 0;
struct object_instance *instance;
struct object_key *object_key = NULL;
struct list_head *list;
const void *key_name,
size_t key_len)
{
- unsigned int res;
+ int res;
int ret = 0;
struct object_instance *instance;
struct object_key *object_key = NULL;
const void *new_value,
size_t new_value_len)
{
- unsigned int res;
+ int res;
int ret = 0;
struct object_instance *instance;
struct object_key *object_key = NULL;
static int object_key_iter_reset(hdb_handle_t object_handle)
{
- unsigned int res;
+ int res;
struct object_instance *instance;
res = hdb_handle_get (&object_instance_database,
size_t *value_len,
objdb_value_types_t *type)
{
- unsigned int res;
+ int res;
struct object_instance *instance;
struct object_key *find_key = NULL;
struct list_head *list;
size_t *value_len)
{
unsigned int pos = 0;
- unsigned int res;
+ int res;
struct object_instance *instance;
struct object_key *find_key = NULL;
struct list_head *list;
hdb_handle_t *parent_handle)
{
struct object_instance *instance;
- unsigned int res;
+ int res;
res = hdb_handle_get (&object_instance_database,
object_handle, (void *)&instance);
size_t *object_name_len)
{
struct object_instance *instance;
- unsigned int res;
+ int res;
res = hdb_handle_get (&object_instance_database,
object_handle, (void *)&instance);
void * priv_data_pt)
{
struct object_instance *instance;
- unsigned int res;
+ int res;
struct object_tracker * tracker_pt;
res = hdb_handle_get (&object_instance_database,
struct object_tracker * obj_tracker_pt = NULL;
struct list_head *list, *tmp_list;
struct list_head *obj_list, *tmp_obj_list;
- unsigned int res;
+ int res;
/* go through the global list and find all the trackers to stop */
for (list = objdb_trackers_head.next, tmp_list = list->next;
FILE *file)
{
struct object_instance *instance;
- unsigned int res;
+ int res;
res = hdb_handle_get (&object_instance_database,
object_handle, (void *)&instance);