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
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-06 19:15:00 +0400
committerFelix Fietkau <nbd@openwrt.org>2011-10-06 19:15:00 +0400
commit08aada9a932b5abde3f18492568d5b2187b49a32 (patch)
tree1968b4d0c507a8d7f2dfa0ab086b1b1ddad717da /blobmsg.h
parent309d7d456f1934a75755504791ad23554a3359d6 (diff)
make the blobmsg format endian agnostic (stick to big-endian)
Diffstat (limited to 'blobmsg.h')
-rw-r--r--blobmsg.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/blobmsg.h b/blobmsg.h
index f2ab007..c266855 100644
--- a/blobmsg.h
+++ b/blobmsg.h
@@ -64,7 +64,7 @@ static inline int blobmsg_type(const struct blob_attr *attr)
static inline void *blobmsg_data(const struct blob_attr *attr)
{
struct blobmsg_hdr *hdr = blob_data(attr);
- return (char *) hdr + blobmsg_hdrlen(hdr->namelen);
+ return (char *) hdr + blobmsg_hdrlen(be16_to_cpu(hdr->namelen));
}
static inline int blobmsg_data_len(const struct blob_attr *attr)