diff options
author | Bo Yang <teboring@google.com> | 2018-03-09 19:26:20 +0000 |
---|---|---|
committer | Bo Yang <teboring@google.com> | 2018-03-11 16:57:44 +0000 |
commit | f30dd0ff0cead9bb1f8f3b1b295392d75705486b (patch) | |
tree | de4d4673be3e2f0a4c1abcb259527bbb552e1646 /upb/msg.c | |
parent | 5029aa439c5f4cc2faebeae4a97ce9bcd7ca8281 (diff) |
Prepare upb_value for encoding/decoding map.
Diffstat (limited to 'upb/msg.c')
-rw-r--r-- | upb/msg.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -95,16 +95,12 @@ static uint8_t upb_msg_fielddefsize(const upb_fielddef *f) { * pointer to that in the tables for extensions/maps. */ static upb_value upb_toval(upb_msgval val) { upb_value ret; - UPB_UNUSED(val); - memset(&ret, 0, sizeof(upb_value)); /* XXX */ + ret.val = val; return ret; } static upb_msgval upb_msgval_fromval(upb_value val) { - upb_msgval ret; - UPB_UNUSED(val); - memset(&ret, 0, sizeof(upb_msgval)); /* XXX */ - return ret; + return val.val; } static upb_ctype_t upb_fieldtotabtype(upb_fieldtype_t type) { |