use designated initializers for yajl_callbacks struct
This commit is contained in:
committed by
Michael Stapelberg
parent
f1560e5eb6
commit
705b43294a
@ -815,7 +815,6 @@ static int add_subscription(void *extra, const unsigned char *s,
|
||||
*/
|
||||
IPC_HANDLER(subscribe) {
|
||||
yajl_handle p;
|
||||
yajl_callbacks callbacks;
|
||||
yajl_status stat;
|
||||
ipc_client *current, *client = NULL;
|
||||
|
||||
@ -834,8 +833,9 @@ IPC_HANDLER(subscribe) {
|
||||
}
|
||||
|
||||
/* Setup the JSON parser */
|
||||
memset(&callbacks, 0, sizeof(yajl_callbacks));
|
||||
callbacks.yajl_string = add_subscription;
|
||||
yajl_callbacks callbacks = {
|
||||
.yajl_string = add_subscription,
|
||||
};
|
||||
|
||||
p = yalloc(&callbacks, (void*)client);
|
||||
stat = yajl_parse(p, (const unsigned char*)message, message_size);
|
||||
|
Reference in New Issue
Block a user