diff options
author | Dmitri Pal <dpal@redhat.com> | 2009-04-08 17:27:44 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-04-09 15:52:48 -0400 |
commit | 7a4629f520bb3da6e349909f90489cac16745b0e (patch) | |
tree | c104cb2c1d561150fbc624ebfc166bb6edb933b8 /collection/collection.c | |
parent | cfde3e8b06ff4939ebf2f8c03c0cbc17f1efd725 (diff) | |
download | ding-libs-7a4629f520bb3da6e349909f90489cac16745b0e.tar.gz ding-libs-7a4629f520bb3da6e349909f90489cac16745b0e.tar.xz ding-libs-7a4629f520bb3da6e349909f90489cac16745b0e.zip |
INI component: Fixed issues introduced by cleanup.
Added a few new functions.
Cleaned code that was subject to conditional build.
Fixed the floating point conversion.
Keep const values as const.
Diffstat (limited to 'collection/collection.c')
-rw-r--r-- | collection/collection.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/collection/collection.c b/collection/collection.c index f63a48f..e2816e6 100644 --- a/collection/collection.c +++ b/collection/collection.c @@ -576,7 +576,7 @@ static int walk_items(struct collection_item *ci, void *custom_data) { struct collection_item *current; - struct collection_item *parent; + struct collection_item *parent = NULL; struct collection_item *sub; int stop = 0; int error = EOK; @@ -2550,7 +2550,7 @@ inline int is_of_class(struct collection_item *item, unsigned cclass) } /* Get propery */ -inline char *get_item_property(struct collection_item *ci,int *property_len) +inline const char *get_item_property(struct collection_item *ci,int *property_len) { if (property_len != NULL) *property_len = ci->property_len; return ci->property; @@ -2569,7 +2569,7 @@ inline int get_item_length(struct collection_item *ci) } /* Get data */ -void *get_item_data(struct collection_item *ci) +inline const void *get_item_data(struct collection_item *ci) { return ci->data; } @@ -2656,4 +2656,3 @@ int set_timestamp(struct collection_item *ci, TRACE_FLOW_STRING("set_timestamp", "Exit point"); return EOK; } - |