i3bar: make len an integer for %.*s in sasprintf

This commit is contained in:
Michael Stapelberg 2011-10-23 16:39:18 +01:00
parent 96f67a53a5
commit 499d4c11e0
1 changed files with 3 additions and 2 deletions

View File

@ -63,10 +63,11 @@ static int config_null_cb(void *params_) {
* *
*/ */
#if YAJL_MAJOR >= 2 #if YAJL_MAJOR >= 2
static int config_string_cb(void *params_, const unsigned char *val, size_t len) { static int config_string_cb(void *params_, const unsigned char *val, size_t _len) {
#else #else
static int config_string_cb(void *params_, const unsigned char *val, unsigned int len) { static int config_string_cb(void *params_, const unsigned char *val, unsigned int _len) {
#endif #endif
int len = (int)_len;
/* The id is ignored, we already have it in config.bar_id */ /* The id is ignored, we already have it in config.bar_id */
if (!strcmp(cur_key, "id")) if (!strcmp(cur_key, "id"))
return 1; return 1;