Revert "use designated initializers for yajl_callbacks struct"

This reverts commit 705b43294a.

This commit broke i3bar for some users.
This commit is contained in:
Michael Stapelberg
2014-01-05 13:05:31 +01:00
parent f6ee035c61
commit 2fea5ef82b
11 changed files with 114 additions and 58 deletions

View File

@ -815,6 +815,7 @@ 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;
@ -833,9 +834,8 @@ IPC_HANDLER(subscribe) {
}
/* Setup the JSON parser */
yajl_callbacks callbacks = {
.yajl_string = add_subscription,
};
memset(&callbacks, 0, sizeof(yajl_callbacks));
callbacks.yajl_string = add_subscription;
p = yalloc(&callbacks, (void*)client);
stat = yajl_parse(p, (const unsigned char*)message, message_size);