util/FormatString: new library to replace g_strdup_printf()

This commit is contained in:
Max Kellermann
2013-10-19 16:58:45 +02:00
parent 1434e5a22e
commit 5dc4cbdf82
8 changed files with 151 additions and 66 deletions

View File

@@ -146,9 +146,7 @@ HttpdClient::SendResponse()
httpd->content_type);
} else if (metadata_requested) {
gchar *metadata_header;
metadata_header =
char *metadata_header =
icy_server_metadata_header(httpd->name, httpd->genre,
httpd->website,
httpd->content_type,
@@ -156,7 +154,7 @@ HttpdClient::SendResponse()
g_strlcpy(buffer, metadata_header, sizeof(buffer));
g_free(metadata_header);
delete[] metadata_header;
} else { /* revert to a normal HTTP request */
snprintf(buffer, sizeof(buffer),