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>2014-04-27 18:32:09 +0400
committerFelix Fietkau <nbd@openwrt.org>2014-04-27 18:32:09 +0400
commitd07b174de8faf76a20cbe003bfc143552f431f85 (patch)
treec5acd2f3c44f4449e95b83ea3ae103dd2d0b7914 /blobmsg.h
parentaa01be8ed07f24a375e74c5da7550171d6f9ca8e (diff)
blobmsg: make length variables unsigned
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'blobmsg.h')
-rw-r--r--blobmsg.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/blobmsg.h b/blobmsg.h
index e9e0e6e..98f673a 100644
--- a/blobmsg.h
+++ b/blobmsg.h
@@ -46,7 +46,7 @@ struct blobmsg_policy {
enum blobmsg_type type;
};
-static inline int blobmsg_hdrlen(int namelen)
+static inline int blobmsg_hdrlen(unsigned int namelen)
{
return BLOBMSG_PADDING(sizeof(struct blobmsg_hdr) + namelen + 1);
}
@@ -91,12 +91,12 @@ static inline int blobmsg_len(const struct blob_attr *attr)
bool blobmsg_check_attr(const struct blob_attr *attr, bool name);
bool blobmsg_check_attr_list(const struct blob_attr *attr, int type);
int blobmsg_parse(const struct blobmsg_policy *policy, int policy_len,
- struct blob_attr **tb, void *data, int len);
+ struct blob_attr **tb, void *data, unsigned int len);
int blobmsg_parse_array(const struct blobmsg_policy *policy, int policy_len,
- struct blob_attr **tb, void *data, int len);
+ struct blob_attr **tb, void *data, unsigned int len);
int blobmsg_add_field(struct blob_buf *buf, int type, const char *name,
- const void *data, int len);
+ const void *data, unsigned int len);
static inline int
blobmsg_add_u8(struct blob_buf *buf, const char *name, uint8_t val)
@@ -202,8 +202,8 @@ static inline char *blobmsg_get_string(struct blob_attr *attr)
return blobmsg_data(attr);
}
-void *blobmsg_alloc_string_buffer(struct blob_buf *buf, const char *name, int maxlen);
-void *blobmsg_realloc_string_buffer(struct blob_buf *buf, int maxlen);
+void *blobmsg_alloc_string_buffer(struct blob_buf *buf, const char *name, unsigned int maxlen);
+void *blobmsg_realloc_string_buffer(struct blob_buf *buf, unsigned int maxlen);
void blobmsg_add_string_buffer(struct blob_buf *buf);
void blobmsg_vprintf(struct blob_buf *buf, const char *name, const char *format, va_list arg);