diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-01-31 03:22:42 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-01-31 03:22:42 +0000 |
commit | 1980fa5dbf6e3aa953d8bd09d69e0700b74a56ad (patch) | |
tree | 1dda390f197eb0fd4dc3bf2e9b4e5b36a8162189 /gtk/prefs_dlg.c | |
parent | 61e26a56bada54f651cb5c4110cae4b8f6548863 (diff) |
Pass ESD_BTN_OK rather than NULL as a second argument to
"simple_dialog()"; NULL might be #defined to be a pointer expression on
some platforms, causing compiler warnings (and, on platforms where a
null pointer doesn't have all its bits 0, possibly causing misbehavior,
although I don't think there are any such platforms on which Ethereal
runs).
Don't allow 0 as button mask argument to "simple_dialog()".
Squelch a compiler warning.
Report fatal problems as errors, not warnings.
Report file I/O errors with "file_open_error_message()".
Report file write errors (including those reported by "close()", e.g.
some errors writing to an NFS server) when saving raw packet data to a
file.
svn path=/trunk/; revision=9915
Diffstat (limited to 'gtk/prefs_dlg.c')
-rw-r--r-- | gtk/prefs_dlg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/prefs_dlg.c b/gtk/prefs_dlg.c index 2b0fefacb7..b67d66d029 100644 --- a/gtk/prefs_dlg.c +++ b/gtk/prefs_dlg.c @@ -1,7 +1,7 @@ /* prefs_dlg.c * Routines for handling preferences * - * $Id: prefs_dlg.c,v 1.77 2004/01/25 12:22:20 ulfl Exp $ + * $Id: prefs_dlg.c,v 1.78 2004/01/31 03:22:41 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1123,7 +1123,7 @@ prefs_main_save_cb(GtkWidget *save_bt _U_, gpointer parent_w) /* Create the directory that holds personal configuration files, if necessary. */ if (create_persconffile_dir(&pf_dir_path) == -1) { - simple_dialog(ESD_TYPE_WARN, NULL, + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Can't create directory\n\"%s\"\nfor preferences file: %s.", pf_dir_path, strerror(errno)); g_free(pf_dir_path); @@ -1131,7 +1131,7 @@ prefs_main_save_cb(GtkWidget *save_bt _U_, gpointer parent_w) /* Write the preferencs out. */ err = write_prefs(&pf_path); if (err != 0) { - simple_dialog(ESD_TYPE_WARN, NULL, + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Can't open preferences file\n\"%s\": %s.", pf_path, strerror(err)); g_free(pf_path); |