diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-08-03 17:00:54 +0400 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-08-03 17:00:54 +0400 |
commit | 042f1a2546660e8aadde2ee65f5fe7a9cc9b1378 (patch) | |
tree | 7a39afc187fc887ff8618227070818d6e44da89a /blobmsg.h | |
parent | 6e8e6aca1d919e9916b2a1c8702d0cdec68e1ada (diff) |
blobmsg: accept NULL attr in blobmsg_get_string()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'blobmsg.h')
-rw-r--r-- | blobmsg.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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); } |