From b1a8ddd9d7518ba08f949efa50dfe192d547afb6 Mon Sep 17 00:00:00 2001 From: Axel Wagner Date: Sat, 7 Aug 2010 01:57:00 +0200 Subject: [PATCH] We don't need a callback for null-values --- i3bar/src/workspaces.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/i3bar/src/workspaces.c b/i3bar/src/workspaces.c index f4df0444..e3efb445 100644 --- a/i3bar/src/workspaces.c +++ b/i3bar/src/workspaces.c @@ -12,18 +12,6 @@ struct workspaces_json_params { char *json; }; -static int workspaces_null_cb(void *params_) { - struct workspaces_json_params *params = (struct workspaces_json_params*) params_; - - if (strcmp(params->cur_key, "current_workspace")) { - return 0; - } - - FREE(params->cur_key); - - return 1; -} - static int workspaces_boolean_cb(void *params_, bool val) { struct workspaces_json_params *params = (struct workspaces_json_params*) params_; @@ -169,7 +157,7 @@ static int workspaces_map_key_cb(void *params_, const unsigned char *keyVal, uns } yajl_callbacks workspaces_callbacks = { - &workspaces_null_cb, + NULL, &workspaces_boolean_cb, &workspaces_integer_cb, NULL, -- 2.39.5