summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--config.c14
-rw-r--r--config.h2
-rw-r--r--device.c2
3 files changed, 1 insertions, 17 deletions
diff --git a/config.c b/config.c
index f3e5f9d..9c1127b 100644
--- a/config.c
+++ b/config.c
@@ -366,20 +366,6 @@ config_check_equal(struct blob_attr *c1, struct blob_attr *c2,
return true;
}
-struct blob_attr *
-config_memdup(struct blob_attr *attr)
-{
- struct blob_attr *ret;
- int size = blob_pad_len(attr);
-
- ret = malloc(size);
- if (!ret)
- return NULL;
-
- memcpy(ret, attr, size);
- return ret;
-}
-
static struct uci_package *
config_init_package(const char *config)
{
diff --git a/config.h b/config.h
index c5e4200..975ba24 100644
--- a/config.h
+++ b/config.h
@@ -58,6 +58,4 @@ bool config_check_equal(struct blob_attr *c1, struct blob_attr *c2,
bool config_diff(struct blob_attr **tb1, struct blob_attr **tb2,
const struct config_param_list *config, unsigned long *diff);
-struct blob_attr *config_memdup(struct blob_attr *attr);
-
#endif
diff --git a/device.c b/device.c
index 1c0736f..5fa0ac1 100644
--- a/device.c
+++ b/device.c
@@ -584,7 +584,7 @@ device_create(const char *name, const struct device_type *type,
struct device *odev = NULL, *dev;
enum dev_change_type change;
- config = config_memdup(config);
+ config = blob_memdup(config);
if (!config)
return NULL;