mbag_add_dword returns pointer to added element.
FossilOrigin-Name: 4f5d7ae392f07339da35544c49635895143310635c29671cc2df400f46b93b7f
This commit is contained in:
parent
57f1daa247
commit
3780d05b9e
@ -174,14 +174,14 @@ static inline int mbag_set_word(mbag_t s, const char *id, uint16_t word)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static inline int mbag_set_dword(mbag_t s, const char *id, uint32_t dword)
|
static inline struct mbag_item * mbag_set_dword(mbag_t s, const char *id, uint32_t dword)
|
||||||
{
|
{
|
||||||
struct mbag_item *i = mbag_item_create(s, id);
|
struct mbag_item *i = mbag_item_create(s, id);
|
||||||
if (!i)
|
if (!i)
|
||||||
return 0;
|
return NULL;
|
||||||
i->dword = dword;
|
i->dword = dword;
|
||||||
i->type = &mbag_type_dword;
|
i->type = &mbag_type_dword;
|
||||||
return 1;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user