aboutsummaryrefslogtreecommitdiffstats
path: root/filters.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-08-08 18:50:39 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-08-08 18:50:39 +0000
commit0dc9fb3d4ab00d14bf45c597471e10e601efd4d4 (patch)
treeae44175ca8fd23548fcec5833098b535af5e372c /filters.c
parentf3407856f4fd97caf90655205cdb2c66991e75ba (diff)
various code cleanup:
-use g_snprintf instead of sprintf and snprintf -use g_strdup_printf where appropriate -remove #include "snprintf.h" (as only g_snprintf should be used) -replace some more alloc/realloc/calloc/free with their glib pendants svn path=/trunk/; revision=15264
Diffstat (limited to 'filters.c')
-rw-r--r--filters.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/filters.c b/filters.c
index e8aa3cb33f..f24f1d30c8 100644
--- a/filters.c
+++ b/filters.c
@@ -458,8 +458,7 @@ save_filter_list(filter_list_type_t list, char **pref_path_return,
/* 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;