diff options
author | Graham Bloice <graham.bloice@trihedral.com> | 2015-09-26 15:46:52 +0100 |
---|---|---|
committer | Graham Bloice <graham.bloice@trihedral.com> | 2015-09-26 16:13:15 +0000 |
commit | 4150bae2c39f25c819ce50aeb447e1d7d19f8451 (patch) | |
tree | f965eb0838548123834157cd90bb51704faab26c /ui/cli | |
parent | 13d28691d6f1deae263a976d9defedd6f1ebb0d2 (diff) |
Fix checkapi warnings
Fix some (mostly spurious) checkapi warnings by renaming the
offending variables.
Change-Id: I7a43ac89f5ed35053a6526fa838fbad67669a49a
Reviewed-on: https://code.wireshark.org/review/10655
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Diffstat (limited to 'ui/cli')
-rw-r--r-- | ui/cli/tap-follow.c | 20 | ||||
-rw-r--r-- | ui/cli/tap-iostat.c | 22 |
2 files changed, 21 insertions, 21 deletions
diff --git a/ui/cli/tap-follow.c b/ui/cli/tap-follow.c index 4a7d27eb10..4977f5a08a 100644 --- a/ui/cli/tap-follow.c +++ b/ui/cli/tap-follow.c @@ -77,7 +77,7 @@ typedef struct mode_e mode; /* filter */ - guint32 index; + guint32 stream_index; address addr[2]; int port[2]; guint8 addrBuf[2][16]; @@ -157,14 +157,14 @@ followStrFilter( gchar ip0[MAX_IP6_STR_LEN]; gchar ip1[MAX_IP6_STR_LEN]; - if (fp->index != G_MAXUINT32) + if (fp->stream_index != G_MAXUINT32) { switch (fp->type) { case type_TCP: case type_SSL: len = g_snprintf(filter, sizeof filter, - "tcp.stream eq %d", fp->index); + "tcp.stream eq %d", fp->stream_index); break; case type_UDP: udpfilter = build_follow_index_filter(UDP_STREAM); @@ -793,7 +793,7 @@ followArgFilter( unsigned int ii; char addr[ADDR_LEN]; - if (sscanf(*opt_argp, ",%u%n", &fp->index, &len) == 1 && + if (sscanf(*opt_argp, ",%u%n", &fp->stream_index, &len) == 1 && ((*opt_argp)[len] == 0 || (*opt_argp)[len] == ',')) { *opt_argp += len; @@ -833,7 +833,7 @@ followArgFilter( { followExit("Mismatched IP address types."); } - fp->index = G_MAXUINT32; + fp->stream_index = G_MAXUINT32; } } @@ -903,9 +903,9 @@ followTcp( followArgDone(opt_argp); reset_tcp_reassembly(); - if (fp->index != G_MAXUINT32) + if (fp->stream_index != G_MAXUINT32) { - if (!follow_index(TCP_STREAM, fp->index)) + if (!follow_index(TCP_STREAM, fp->stream_index)) { followExit("Can't follow TCP index."); } @@ -950,9 +950,9 @@ followUdp( followArgDone(opt_argp); reset_udp_follow(); - if (fp->index != G_MAXUINT32) + if (fp->stream_index != G_MAXUINT32) { - if (!follow_index(UDP_STREAM, fp->index)) + if (!follow_index(UDP_STREAM, fp->stream_index)) { followExit("Can't follow UDP index."); } @@ -997,7 +997,7 @@ followSsl( followArgDone(opt_argp); reset_tcp_reassembly(); - if (fp->index == G_MAXUINT32) + if (fp->stream_index == G_MAXUINT32) { followExit("SSL only supports index filters."); } diff --git a/ui/cli/tap-iostat.c b/ui/cli/tap-iostat.c index 5641362703..93416def0a 100644 --- a/ui/cli/tap-iostat.c +++ b/ui/cli/tap-iostat.c @@ -75,7 +75,7 @@ typedef struct _io_stat_item_t { io_stat_t *parent; struct _io_stat_item_t *next; struct _io_stat_item_t *prev; - guint64 time; /* Time since start of capture (us)*/ + guint64 start_time; /* Time since start of capture (us)*/ int calc_type; /* The statistic type */ int colnum; /* Column number of this stat (0 to n) */ int hf_index; @@ -126,14 +126,14 @@ iostat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt, const void *du * between the last struct and this one. If an item was not found in a previous interval, an empty * struct will be created for it. */ rt = relative_time; - while (rt >= it->time + parent->interval) { + while (rt >= it->start_time + parent->interval) { it->next = (io_stat_item_t *)g_malloc(sizeof(io_stat_item_t)); it->next->prev = it; it->next->next = NULL; it = it->next; mit->prev = it; - it->time = it->prev->time + parent->interval; + it->start_time = it->prev->start_time + parent->interval; it->frames = 0; it->counter = 0; it->float_counter = 0; @@ -1228,14 +1228,14 @@ register_io_tap(io_stat_t *io, int i, const char *filter) char *field; header_field_info *hfi; - io->items[i].prev = &io->items[i]; - io->items[i].next = NULL; - io->items[i].parent = io; - io->items[i].time = 0; - io->items[i].calc_type = CALC_TYPE_FRAMES_AND_BYTES; - io->items[i].frames = 0; - io->items[i].counter = 0; - io->items[i].num = 0; + io->items[i].prev = &io->items[i]; + io->items[i].next = NULL; + io->items[i].parent = io; + io->items[i].start_time = 0; + io->items[i].calc_type = CALC_TYPE_FRAMES_AND_BYTES; + io->items[i].frames = 0; + io->items[i].counter = 0; + io->items[i].num = 0; io->filters[i] = filter; flt = filter; |