diff options
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/autocomplete.c | 2 | ||||
-rw-r--r-- | src/tools/http_upload.c | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/tools/autocomplete.c b/src/tools/autocomplete.c index 27532081..8c7818e7 100644 --- a/src/tools/autocomplete.c +++ b/src/tools/autocomplete.c @@ -315,7 +315,7 @@ static char* _autocomplete_param_common(const char* const input, char* command, autocomplete_func func, Autocomplete ac, gboolean quote, gboolean previous, void* context) { int len; - auto_char char* command_cpy = g_strdup_printf("%s ", command); + auto_gchar gchar* command_cpy = g_strdup_printf("%s ", command); if (!command_cpy) { return NULL; } diff --git a/src/tools/http_upload.c b/src/tools/http_upload.c index 4dae41c5..289dba15 100644 --- a/src/tools/http_upload.c +++ b/src/tools/http_upload.c @@ -399,15 +399,13 @@ file_mime_type(const char* const filename) size_t file_header_size = fread(file_header, 1, FILE_HEADER_BYTES, fh); fclose(fh); - char* content_type = g_content_type_guess(filename, (unsigned char*)file_header, file_header_size, NULL); + auto_gchar gchar* content_type = g_content_type_guess(filename, (unsigned char*)file_header, file_header_size, NULL); if (content_type != NULL) { - char* mime_type = g_content_type_get_mime_type(content_type); + auto_gchar gchar* mime_type = g_content_type_get_mime_type(content_type); out_mime_type = strdup(mime_type); - g_free(mime_type); } else { return strdup(FALLBACK_MIMETYPE); } - g_free(content_type); return out_mime_type; } |