Codebase list i3-gaps / c6cf0d3
placeholder_t: Make char*s const Similarly to https://github.com/i3/i3status/pull/412 Orestis Floros 4 years ago
2 changed file(s) with 7 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
542542 /** Helper structure for usage in format_placeholders(). */
543543 typedef struct placeholder_t {
544544 /* The placeholder to be replaced, e.g., "%title". */
545 char *name;
545 const char *name;
546546 /* The value this placeholder should be replaced with. */
547 char *value;
547 const char *value;
548548 } placeholder_t;
549549
550550 /**
23172317 char *formatted_str = format_placeholders(con->title_format, &placeholders[0], num);
23182318 i3String *formatted = i3string_from_utf8(formatted_str);
23192319 i3string_set_markup(formatted, pango_markup);
2320 FREE(formatted_str);
2321
2322 for (size_t i = 0; i < num; i++) {
2323 FREE(placeholders[i].value);
2324 }
2320
2321 free(formatted_str);
2322 free(title);
2323 free(class);
2324 free(instance);
23252325
23262326 return formatted;
23272327 }