aboutsummaryrefslogtreecommitdiffstats
path: root/prefs.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-05-15 07:44:54 +0000
committerGuy Harris <guy@alum.mit.edu>2003-05-15 07:44:54 +0000
commite1647e4504d31f8260e23ec60c645735516060e0 (patch)
tree49ebcdcfb4b2a8c020befb29cf224778712b71b9 /prefs.c
parent86f3c38c4aef93560541c50e2f501e94802b337d (diff)
From Richard Urwin:
add support for a system-wide color filter file; fix a bug where "read_filters()" didn't close the file handle. Use the "get_datafile_path()" routine he added to construct the pathname of the Diameter directory, the global preferences file, and the manuf file. svn path=/trunk/; revision=7677
Diffstat (limited to 'prefs.c')
-rw-r--r--prefs.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/prefs.c b/prefs.c
index 9b26b784dc..5fe016a87f 100644
--- a/prefs.c
+++ b/prefs.c
@@ -1,7 +1,7 @@
/* prefs.c
* Routines for handling preferences
*
- * $Id: prefs.c,v 1.100 2003/04/21 21:28:31 guy Exp $
+ * $Id: prefs.c,v 1.101 2003/05/15 07:44:53 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -986,12 +986,8 @@ read_prefs(int *gpf_errno_return, char **gpf_path_return,
}
/* Construct the pathname of the global preferences file. */
- if (! gpf_path) {
- gpf_path = (gchar *) g_malloc(strlen(get_datafile_dir()) +
- strlen(GPF_NAME) + 2);
- sprintf(gpf_path, "%s" G_DIR_SEPARATOR_S "%s",
- get_datafile_dir(), GPF_NAME);
- }
+ if (! gpf_path)
+ gpf_path = get_datafile_path(GPF_NAME);
/* Read the global preferences file, if it exists. */
*gpf_path_return = NULL;