aboutsummaryrefslogtreecommitdiffstats
path: root/ui/export_object_ui.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-01-01 14:12:15 -0800
committerPeter Wu <peter@lekensteyn.nl>2019-01-01 23:12:17 +0000
commit8059bad284b6e1cff0db14582f74ab8f5cbe121c (patch)
treef98e6a43399633250a53e622f3d2fd6de688434e /ui/export_object_ui.c
parentcaa2c0a95e58a8a099fd7b3271ab0ca7a407b356 (diff)
No need to report "some files could not be saved".
We've already reported the files that couldn't be saved; no need to tell the user something they already know by that point. Change-Id: I8251a46134342df6b40a6324aa76a5237fde7c93 Reviewed-on: https://code.wireshark.org/review/31298 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'ui/export_object_ui.c')
-rw-r--r--ui/export_object_ui.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/ui/export_object_ui.c b/ui/export_object_ui.c
index 91735c24a1..67ec18eb4d 100644
--- a/ui/export_object_ui.c
+++ b/ui/export_object_ui.c
@@ -27,7 +27,7 @@
#include "export_object_ui.h"
-gboolean
+void
eo_save_entry(const gchar *save_as_filename, export_object_entry_t *entry)
{
int to_fd;
@@ -41,7 +41,7 @@ eo_save_entry(const gchar *save_as_filename, export_object_entry_t *entry)
O_BINARY, 0644);
if(to_fd == -1) { /* An error occurred */
report_open_failure(save_as_filename, errno, TRUE);
- return FALSE;
+ return;
}
/*
@@ -65,24 +65,20 @@ eo_save_entry(const gchar *save_as_filename, export_object_entry_t *entry)
else
bytes_to_write = (int)bytes_left;
bytes_written = ws_write(to_fd, ptr, bytes_to_write);
- if(bytes_written <= 0) {
+ if (bytes_written <= 0) {
if (bytes_written < 0)
err = errno;
else
err = WTAP_ERR_SHORT_WRITE;
report_write_failure(save_as_filename, err);
ws_close(to_fd);
- return FALSE;
+ break;
}
bytes_left -= bytes_written;
ptr += bytes_written;
}
- if (ws_close(to_fd) < 0) {
+ if (ws_close(to_fd) < 0)
report_write_failure(save_as_filename, errno);
- return FALSE;
- }
-
- return TRUE;
}
/*