From: Axel Wagner Date: Fri, 6 Aug 2010 23:57:00 +0000 (+0200) Subject: We don't need a callback for null-values X-Git-Tag: 4.0.1~7^2~87 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b1a8ddd9d7518ba08f949efa50dfe192d547afb6;p=i3%2Fi3 We don't need a callback for null-values --- 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,