Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/blob.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-06 19:14:44 +0400
committerFelix Fietkau <nbd@openwrt.org>2011-10-06 19:14:44 +0400
commit309d7d456f1934a75755504791ad23554a3359d6 (patch)
tree240f34ec11a2539d6ecbaed0deccd30692d8e50e /blob.h
parentf24324c27fe8299b22e983171285eb93d4a74721 (diff)
fill padding bytes when setting raw attribute length
Diffstat (limited to 'blob.h')
-rw-r--r--blob.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/blob.h b/blob.h
index 7f4a46a..460ea5e 100644
--- a/blob.h
+++ b/blob.h
@@ -165,15 +165,6 @@ blob_pad_len(const struct blob_attr *attr)
return len;
}
-static inline void
-blob_set_raw_len(struct blob_attr *attr, unsigned int len)
-{
- int id = blob_id(attr);
- len &= BLOB_ATTR_LEN_MASK;
- len |= (id << BLOB_ATTR_ID_SHIFT) & BLOB_ATTR_ID_MASK;
- attr->id_len = cpu_to_be32(len);
-}
-
static inline uint8_t
blob_get_u8(const struct blob_attr *attr)
{
@@ -213,6 +204,7 @@ blob_next(const struct blob_attr *attr)
return (struct blob_attr *) ((char *) attr + blob_pad_len(attr));
}
+extern void blob_set_raw_len(struct blob_attr *attr, unsigned int len);
extern bool blob_attr_equal(const struct blob_attr *a1, const struct blob_attr *a2);
extern int blob_buf_init(struct blob_buf *buf, int id);
extern void blob_buf_free(struct blob_buf *buf);