diff options
-rw-r--r-- | config.c | 14 | ||||
-rw-r--r-- | config.h | 2 | ||||
-rw-r--r-- | device.c | 2 |
3 files changed, 1 insertions, 17 deletions
@@ -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) { @@ -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 @@ -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; |