aboutsummaryrefslogtreecommitdiffstats
path: root/editcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-04-20 11:23:51 -0700
committerGuy Harris <guy@alum.mit.edu>2017-04-20 18:24:20 +0000
commit9e9d284d9157a8b79964015be868f4e8c43274c3 (patch)
treebad43c0cd5b46eb04fd25ed9a5cf6f598d731391 /editcap.c
parentd09ef614598cf6b714059f39191f09af5701bc93 (diff)
Have separate routines for open-for-reading and open-for-writing errors.
Expand comments while we're at it. Change-Id: I6dcc791eab1c9e323a9572f3d54720d223bdd64b Reviewed-on: https://code.wireshark.org/review/21252 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'editcap.c')
-rw-r--r--editcap.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/editcap.c b/editcap.c
index 6f3e804a36..f0564b5267 100644
--- a/editcap.c
+++ b/editcap.c
@@ -1351,8 +1351,8 @@ main(int argc, char *argv[])
wth = wtap_open_offline(argv[optind], WTAP_TYPE_AUTO, &read_err, &read_err_info, FALSE);
if (!wth) {
- cfile_open_failure_message("editap", argv[optind], read_err,
- read_err_info, FALSE, WTAP_TYPE_AUTO);
+ cfile_open_failure_message("editcap", argv[optind], read_err,
+ read_err_info);
ret = INVALID_FILE;
goto clean_exit;
}
@@ -1423,9 +1423,8 @@ main(int argc, char *argv[])
shb_hdrs, idb_inf, nrb_hdrs, &write_err);
if (pdh == NULL) {
- cfile_open_failure_message("editcap", filename,
- write_err, NULL, TRUE,
- out_frame_type);
+ cfile_dump_open_failure_message("editcap", filename,
+ write_err, out_frame_type);
ret = INVALID_FILE;
goto clean_exit;
}
@@ -1465,9 +1464,9 @@ main(int argc, char *argv[])
shb_hdrs, idb_inf, nrb_hdrs, &write_err);
if (pdh == NULL) {
- cfile_open_failure_message("editcap", filename,
- write_err, NULL, TRUE,
- out_frame_type);
+ cfile_dump_open_failure_message("editcap", filename,
+ write_err,
+ out_frame_type);
ret = INVALID_FILE;
goto clean_exit;
}
@@ -1495,9 +1494,9 @@ main(int argc, char *argv[])
snaplen ? MIN(snaplen, wtap_snapshot_length(wth)) : wtap_snapshot_length(wth),
shb_hdrs, idb_inf, nrb_hdrs, &write_err);
if (pdh == NULL) {
- cfile_open_failure_message("editcap", filename,
- write_err, NULL, TRUE,
- out_frame_type);
+ cfile_dump_open_failure_message("editcap", filename,
+ write_err,
+ out_frame_type);
ret = INVALID_FILE;
goto clean_exit;
}
@@ -1809,9 +1808,9 @@ main(int argc, char *argv[])
snaplen ? MIN(snaplen, wtap_snapshot_length(wth)): wtap_snapshot_length(wth),
shb_hdrs, idb_inf, nrb_hdrs, &write_err);
if (pdh == NULL) {
- cfile_open_failure_message("editcap", filename,
- write_err, NULL, TRUE,
- out_frame_type);
+ cfile_dump_open_failure_message("editcap", filename,
+ write_err,
+ out_frame_type);
ret = INVALID_FILE;
goto clean_exit;
}