#define INIT_BUF_SIZE 128
void
-read_filter_list(filter_list_type_t list, const char **pref_path_return,
+read_filter_list(filter_list_type_t list, char **pref_path_return,
int *errno_return)
{
const char *ff_name;
* and "*errno_return" is set to the error.
*/
void
-save_filter_list(filter_list_type_t list, const char **pref_path_return,
+save_filter_list(filter_list_type_t list, char **pref_path_return,
int *errno_return)
{
const gchar *ff_name;
/* Write to "XXX.new", and rename if that succeeds.
That means we don't trash the file if we fail to write it out
completely. */
- ff_path_new = (gchar *) g_malloc(strlen(ff_path) + 5);
- sprintf(ff_path_new, "%s.new", ff_path);
+ ff_path_new = g_strdup_printf("%s.new", ff_path);
if ((ff = fopen(ff_path_new, "w")) == NULL) {
*pref_path_return = ff_path;