Change char->free to auto_char char for autocleanup

Replace `gchar` and `g_free` to `auto_gchar`
Correct certain  `char` functions/variables to `gchar`

Related to #1819.

Edited by @jubalh.
This commit is contained in:
John Hernandez
2023-07-11 13:23:58 +02:00
parent 245d69deb6
commit e1d137f4e6
62 changed files with 498 additions and 969 deletions

View File

@@ -255,7 +255,7 @@ notify(const char* const message, int timeout, const char* const category)
#ifdef HAVE_OSXNOTIFY
GString* notify_command = g_string_new("terminal-notifier -title \"Profanity\" -message '");
char* escaped_single = str_replace(message, "'", "'\\''");
auto_char char* escaped_single = str_replace(message, "'", "'\\''");
if (escaped_single[0] == '<') {
g_string_append(notify_command, "\\<");
@@ -274,7 +274,6 @@ notify(const char* const message, int timeout, const char* const category)
}
g_string_append(notify_command, "'");
free(escaped_single);
char* term_name = getenv("TERM_PROGRAM");
char* app_id = NULL;