projects
/
oweals
/
libubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e8e6ac
)
blobmsg: accept NULL attr in blobmsg_get_string()
author
Felix Fietkau
<nbd@openwrt.org>
Sun, 3 Aug 2014 13:00:54 +0000
(15:00 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Sun, 3 Aug 2014 13:00:54 +0000
(15:00 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
blobmsg.h
patch
|
blob
|
history
diff --git
a/blobmsg.h
b/blobmsg.h
index 7041aca229e38c5285a4832c59d22efd9a9f6fdc..e58f95deb6be700c501fdfb2b8b604df459db47b 100644
(file)
--- a/
blobmsg.h
+++ b/
blobmsg.h
@@
-214,6
+214,9
@@
static inline uint64_t blobmsg_get_u64(struct blob_attr *attr)
static inline char *blobmsg_get_string(struct blob_attr *attr)
{
+ if (!attr)
+ return NULL;
+
return (char *) blobmsg_data(attr);
}