From 246206695dcec2debcfc2ee1eeb429f028edec3f Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 23 Jul 2013 21:02:51 -0700 Subject: [PATCH] store: Removed unused sdb_attribute_create(). --- src/core/store.c | 19 ++----------------- src/include/core/store.h | 4 ---- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/src/core/store.c b/src/core/store.c index b933581..1dcecaa 100644 --- a/src/core/store.c +++ b/src/core/store.c @@ -143,8 +143,8 @@ sdb_attr_clone(const sdb_object_t *obj) const sdb_attribute_t *attr = (const sdb_attribute_t *)obj; sdb_attribute_t *new; - new = sdb_attribute_create(attr->hostname, - obj->name, attr->attr_value); + new = SDB_ATTR(sdb_object_create(obj->name, sdb_attribute_type, + attr->hostname, attr->attr_value)); if (! new) return NULL; @@ -322,21 +322,6 @@ sdb_store_has_host(const char *name) return host != NULL; } /* sdb_store_has_host */ -sdb_attribute_t * -sdb_attribute_create(const char *hostname, - const char *name, const char *value) -{ - sdb_object_t *obj; - - if ((! hostname) || (! name) || (! value)) - return NULL; - - obj = sdb_object_create(name, sdb_attribute_type, hostname, value); - if (! obj) - return NULL; - return SDB_ATTR(obj); -} /* sdb_attribute_create */ - int sdb_store_attribute(const sdb_attribute_t *attr) { diff --git a/src/include/core/store.h b/src/include/core/store.h index aac884a..143fa7e 100644 --- a/src/include/core/store.h +++ b/src/include/core/store.h @@ -104,10 +104,6 @@ sdb_store_host(const char *name, sdb_time_t last_update); _Bool sdb_store_has_host(const char *name); -sdb_attribute_t * -sdb_attribute_create(const char *hostname, - const char *name, const char *value); - /* * sdb_store_attribute: * Add/update a host's attribute in the store. If the attribute, identified by -- 2.30.2