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/find_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/find_dlg.c')
-rw-r--r-- | gtk/find_dlg.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gtk/find_dlg.c b/gtk/find_dlg.c index 313e2f6efb..47a3682385 100644 --- a/gtk/find_dlg.c +++ b/gtk/find_dlg.c @@ -1,7 +1,7 @@ /* find_dlg.c * Routines for "find frame" window * - * $Id: find_dlg.c,v 1.44 2004/01/31 02:25:45 ulfl Exp $ + * $Id: find_dlg.c,v 1.45 2004/01/31 03:22:40 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -548,7 +548,7 @@ find_frame_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w) */ bytes = convert_string_to_hex(filter_text, &nbytes); if (bytes == NULL) { - simple_dialog(ESD_TYPE_ERROR, NULL, + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "You didn't specify a valid hex string."); return; } @@ -564,7 +564,7 @@ find_frame_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w) else if (strcmp(string_type, "ASCII Unicode") == 0) scs_type = SCS_UNICODE; else { - simple_dialog(ESD_TYPE_ERROR, NULL, "You didn't choose a valid character set."); + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "You didn't choose a valid character set."); return; } string = convert_string_case(filter_text, case_type); @@ -574,14 +574,14 @@ find_frame_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w) */ if (!dfilter_compile(filter_text, &sfcode)) { /* The attempt failed; report an error. */ - simple_dialog(ESD_TYPE_ERROR, NULL, dfilter_error_msg); + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, dfilter_error_msg); return; } /* Was it empty? */ if (sfcode == NULL) { /* Yes - complain. */ - simple_dialog(ESD_TYPE_ERROR, NULL, + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "You didn't specify a valid filter expression."); return; } @@ -606,7 +606,7 @@ find_frame_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w) g_free(bytes); if (!found_packet) { /* We didn't find a packet */ - simple_dialog(ESD_TYPE_ERROR, NULL, "No packet contained those bytes."); + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "No packet contained those bytes."); g_free(bytes); return; } @@ -618,7 +618,7 @@ find_frame_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w) g_free(string); if (!found_packet) { /* We didn't find the packet. */ - simple_dialog(ESD_TYPE_ERROR, NULL, "No packet contained that string in its dissected display."); + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "No packet contained that string in its dissected display."); return; } } else if (cfile.summary_data) { @@ -627,7 +627,7 @@ find_frame_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w) g_free(string); if (!found_packet) { /* We didn't find the packet. */ - simple_dialog(ESD_TYPE_ERROR, NULL, "No packet contained that string in its Info column."); + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "No packet contained that string in its Info column."); return; } } else { @@ -636,7 +636,7 @@ find_frame_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w) g_free(string); if (!found_packet) { /* We didn't find the packet. */ - simple_dialog(ESD_TYPE_ERROR, NULL, "No packet contained that string in its data."); + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "No packet contained that string in its data."); return; } } @@ -645,7 +645,7 @@ find_frame_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w) dfilter_free(sfcode); if (!found_packet) { /* We didn't find a packet */ - simple_dialog(ESD_TYPE_ERROR, NULL, "No packet matched that filter."); + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "No packet matched that filter."); g_free(bytes); return; } |