diff options
| author | Felix Fietkau | 2024-12-19 10:26:18 +0000 |
|---|---|---|
| committer | Felix Fietkau | 2024-12-19 10:26:21 +0000 |
| commit | 3868f47c8f6c6570e62a3cdf8a7f26ffb1a67e6a (patch) | |
| tree | d9903578d95e13cff9ae282691bef73c9d838b14 | |
| parent | eb9bcb64185ac155c02cc1a604692c4b00368324 (diff) | |
| download | libubox-3868f47c8f6c6570e62a3cdf8a7f26ffb1a67e6a.tar.gz | |
blob: constify attr argument to blob_memdup
It is not modified, so it can be const
Signed-off-by: Felix Fietkau <nbd@nbd.name>
| -rw-r--r-- | blob.c | 2 | ||||
| -rw-r--r-- | blob.h | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -323,7 +323,7 @@ blob_attr_equal(const struct blob_attr *a1, const struct blob_attr *a2) } struct blob_attr * -blob_memdup(struct blob_attr *attr) +blob_memdup(const struct blob_attr *attr) { struct blob_attr *ret; int size = blob_pad_len(attr); @@ -200,7 +200,7 @@ extern struct blob_attr *blob_put(struct blob_buf *buf, int id, const void *ptr, extern bool blob_check_type(const void *ptr, unsigned int len, int type); extern int blob_parse(struct blob_attr *attr, struct blob_attr **data, const struct blob_attr_info *info, int max); extern int blob_parse_untrusted(struct blob_attr *attr, size_t attr_len, struct blob_attr **data, const struct blob_attr_info *info, int max); -extern struct blob_attr *blob_memdup(struct blob_attr *attr); +extern struct blob_attr *blob_memdup(const struct blob_attr *attr); extern struct blob_attr *blob_put_raw(struct blob_buf *buf, const void *ptr, unsigned int len); static inline struct blob_attr * |