summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Dominique Martinet <asmadeus@codewreck.org>2018-07-05 07:07:59 +0900
committerLibravatar Dominique Martinet <asmadeus@codewreck.org>2018-07-05 13:11:02 +0900
commitfe72e3b349f0905519481b77b22c525aca9c704d (patch)
tree3b63d204bf5b1fef09814d45786030c46a317b86 /include
parentworkspace_next_name: free targets later than these already found in order (diff)
downloadsway-fe72e3b349f0905519481b77b22c525aca9c704d.tar.gz
sway-fe72e3b349f0905519481b77b22c525aca9c704d.tar.zst
sway-fe72e3b349f0905519481b77b22c525aca9c704d.zip
cmd_results_to_json: return copied string and properly free the json
The only user of this function would copy the string right away to get rid of the const flag anyway, and freeing a const string afterwards might work but is not meant to be done according to the json-c API.
Diffstat (limited to 'include')
-rw-r--r--include/sway/commands.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h
index 7ca0bda8..6d17144a 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -79,7 +79,7 @@ void free_cmd_results(struct cmd_results *results);
79 * 79 *
80 * Free the JSON string later on. 80 * Free the JSON string later on.
81 */ 81 */
82const char *cmd_results_to_json(struct cmd_results *results); 82char *cmd_results_to_json(struct cmd_results *results);
83 83
84struct cmd_results *add_color(const char *name, 84struct cmd_results *add_color(const char *name,
85 char *buffer, const char *color); 85 char *buffer, const char *color);