Code

store: Removed unsed function sdb_service_create().
[sysdb.git] / src / core / store.c
index b9335818c203a753cd3fa84ae2db18b270e7cfe7..8e41186f18fbbf4bd2d8d0d48cd80ace520b398a 100644 (file)
@@ -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;
 
@@ -181,7 +181,8 @@ sdb_svc_clone(const sdb_object_t *obj)
        const sdb_service_t *svc = (const sdb_service_t *)obj;
        sdb_service_t *new;
 
-       new = sdb_service_create(svc->hostname, obj->name);
+       new = SDB_SVC(sdb_object_create(obj->name, sdb_service_type,
+                               svc->hostname));
        if (! new)
                return NULL;
 
@@ -322,21 +323,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)
 {
@@ -399,20 +385,6 @@ sdb_store_attribute(const sdb_attribute_t *attr)
        return status;
 } /* sdb_store_attribute */
 
-sdb_service_t *
-sdb_service_create(const char *hostname, const char *name)
-{
-       sdb_object_t *obj;
-
-       if ((! hostname) || (! name))
-               return NULL;
-
-       obj = sdb_object_create(name, sdb_service_type, hostname);
-       if (! obj)
-               return NULL;
-       return SDB_SVC(obj);
-} /* sdb_service_create */
-
 int
 sdb_store_service(const sdb_service_t *svc)
 {