From 62b342443ddf2e5089c9cbaf137dc6a81b0b4678 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 8 Apr 2017 20:02:53 -0700 Subject: Pull the error-reporting code for preference files into read_prefs(). No need to duplicate it in N different programs. Update comments while we're at it. Change-Id: I3096cbe5448a19363eff6303bdd54e522dae9336 Reviewed-on: https://code.wireshark.org/review/20973 Reviewed-by: Guy Harris --- epan/prefs.h | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'epan/prefs.h') diff --git a/epan/prefs.h b/epan/prefs.h index 74ea1a0217..77a3624ff5 100644 --- a/epan/prefs.h +++ b/epan/prefs.h @@ -589,18 +589,9 @@ char *prefs_pref_to_str(pref_t *pref, pref_source_t source); /* Read the preferences file, fill in "prefs", and return a pointer to it. - If we got an error (other than "it doesn't exist") trying to read - the global preferences file, stuff the errno into "*gpf_errno_return" - on an open error and into "*gpf_read_errno_return" on a read error, - stuff a pointer to the path of the file into "*gpf_path_return", and - return NULL. - - If we got an error (other than "it doesn't exist") trying to read - the user's preferences file, stuff the errno into "*pf_errno_return" - on an open error and into "*pf_read_errno_return" on a read error, - stuff a pointer to the path of the file into "*pf_path_return", and - return NULL. */ -WS_DLL_PUBLIC e_prefs *read_prefs(int *, int *, char **, int *, int *, char **); + If we got an error (other than "it doesn't exist") we report it through + the UI. */ +WS_DLL_PUBLIC e_prefs *read_prefs(void); /* Write out "prefs" to the user's preferences file, and return 0. -- cgit v1.2.3