summaryrefslogtreecommitdiffstats
path: root/reordercap.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:26 +0000
commitc4e8a3222648fcf22ca207f1815ebbf7cd144eeb (patch)
tree93d5c6aa93d9987680dd1adad5685e2ad698f223 /reordercap.c
parentAdding upstream version 4.2.6. (diff)
downloadwireshark-upstream.tar.xz
wireshark-upstream.zip
Adding upstream version 4.4.0.upstream/4.4.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--reordercap.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/reordercap.c b/reordercap.c
index a8aba004..f5df1701 100644
--- a/reordercap.c
+++ b/reordercap.c
@@ -56,8 +56,8 @@ print_usage(FILE *output)
/* Remember where this frame was in the file */
typedef struct FrameRecord_t {
- gint64 offset;
- guint num;
+ int64_t offset;
+ unsigned num;
nstime_t frame_time;
} FrameRecord_t;
@@ -83,7 +83,7 @@ frame_write(FrameRecord_t *frame, wtap *wth, wtap_dumper *pdh,
const char *outfile)
{
int err;
- gchar *err_info;
+ char *err_info;
DEBUG_PRINT("\nDumping frame (offset=%" PRIu64 ")\n",
frame->offset);
@@ -121,7 +121,7 @@ frame_write(FrameRecord_t *frame, wtap *wth, wtap_dumper *pdh,
positive if (t1 > t2)
*/
static int
-frames_compare(gconstpointer a, gconstpointer b)
+frames_compare(const void *a, const void *b)
{
const FrameRecord_t *frame1 = *(const FrameRecord_t *const *) a;
const FrameRecord_t *frame2 = *(const FrameRecord_t *const *) b;
@@ -178,11 +178,11 @@ main(int argc, char *argv[])
wtap_rec rec;
Buffer buf;
int err;
- gchar *err_info;
- gint64 data_offset;
- guint wrong_order_count = 0;
- gboolean write_output_regardless = TRUE;
- guint i;
+ char *err_info;
+ int64_t data_offset;
+ unsigned wrong_order_count = 0;
+ bool write_output_regardless = true;
+ unsigned i;
wtap_dump_params params;
int ret = EXIT_SUCCESS;
@@ -231,13 +231,13 @@ main(int argc, char *argv[])
init_report_message("reordercap", &reordercap_message_routines);
- wtap_init(TRUE);
+ wtap_init(true);
/* Process the options first */
while ((opt = ws_getopt_long(argc, argv, "hnv", long_options, NULL)) != -1) {
switch (opt) {
case 'n':
- write_output_regardless = FALSE;
+ write_output_regardless = false;
break;
case 'h':
show_help_header("Reorder timestamps of input file frames into output file.");
@@ -268,7 +268,7 @@ main(int argc, char *argv[])
/* Open infile */
/* TODO: if reordercap is ever changed to give the user a choice of which
open_routine reader to use, then the following needs to change. */
- wth = wtap_open_offline(infile, WTAP_TYPE_AUTO, &err, &err_info, TRUE);
+ wth = wtap_open_offline(infile, WTAP_TYPE_AUTO, &err, &err_info, true);
if (wth == NULL) {
cfile_open_failure_message(infile, err, err_info);
ret = WS_EXIT_OPEN_ERROR;