aboutsummaryrefslogtreecommitdiffstats
path: root/sharkd_session.c
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2017-12-07 20:37:54 +0100
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2017-12-07 20:10:24 +0000
commit8687fca8a821f95075e8c365c7422f157845787b (patch)
treecb06c72615ac3f8b72e42c5586872933ddd6acf7 /sharkd_session.c
parent42b191a65770dbad2d418dc62d0a58b9dd4e5f31 (diff)
sharkd: fix coding style.
Change-Id: I62ff3f358d1efa3065077b0a913ba614f67f3fd7 Reviewed-on: https://code.wireshark.org/review/24727 Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl> Tested-by: Petri Dish Buildbot Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Diffstat (limited to 'sharkd_session.c')
-rw-r--r--sharkd_session.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/sharkd_session.c b/sharkd_session.c
index 541166798a..e348ae34a4 100644
--- a/sharkd_session.c
+++ b/sharkd_session.c
@@ -283,7 +283,7 @@ sharkd_session_process_info_conv_cb(const void* key, void* value, void* userdata
struct register_ct *table = (struct register_ct *) value;
int *pi = (int *) userdata;
- const char *label = (const char*)key;
+ const char *label = (const char *) key;
if (get_conversation_packet_func(table))
{
@@ -310,7 +310,7 @@ sharkd_session_process_info_conv_cb(const void* key, void* value, void* userdata
static gboolean
sharkd_session_seq_analysis_cb(const void *key, void *value, void *userdata)
{
- register_analysis_t *analysis = (register_analysis_t*) value;
+ register_analysis_t *analysis = (register_analysis_t *) value;
int *pi = (int *) userdata;
printf("%s{", (*pi) ? "," : "");
@@ -325,7 +325,7 @@ sharkd_session_seq_analysis_cb(const void *key, void *value, void *userdata)
static gboolean
sharkd_export_object_visit_cb(const void *key _U_, void *value, void *user_data)
{
- register_eo_t *eo = (register_eo_t*)value;
+ register_eo_t *eo = (register_eo_t *) value;
int *pi = (int *) user_data;
const int proto_id = get_eo_proto_id(eo);
@@ -382,7 +382,7 @@ sharkd_rtd_visit_cb(const void *key _U_, void *value, void *user_data)
static gboolean
sharkd_follower_visit_cb(const void *key _U_, void *value, void *user_data)
{
- register_follow_t *follower = (register_follow_t*) value;
+ register_follow_t *follower = (register_follow_t *) value;
int *pi = (int *) user_data;
const int proto_id = get_follow_proto_id(follower);
@@ -2003,7 +2003,7 @@ static void
sharkd_session_process_tap_eo_cb(void *tapdata)
{
export_object_list_t *tap_object = (export_object_list_t *) tapdata;
- struct sharkd_export_object_list *object_list = (struct sharkd_export_object_list*) tap_object->gui_data;
+ struct sharkd_export_object_list *object_list = (struct sharkd_export_object_list *) tap_object->gui_data;
GSList *slist;
int i = 0;
@@ -2185,7 +2185,7 @@ sharkd_session_process_tap(char *buf, const jsmntok_t *tokens, int count)
int i;
rtpstream_tapinfo_t rtp_tapinfo =
- {NULL, NULL, NULL, NULL, 0, NULL, 0, TAP_ANALYSE, NULL, NULL, NULL, FALSE};
+ { NULL, NULL, NULL, NULL, 0, NULL, 0, TAP_ANALYSE, NULL, NULL, NULL, FALSE };
for (i = 0; i < 16; i++)
{
@@ -2718,7 +2718,8 @@ sharkd_session_process_frame_cb_tree(epan_dissect_t *edt, proto_tree *tree, tvbu
printf(",\"s\":\"%s\"", severity);
}
- if (((proto_tree *) node)->first_child) {
+ if (((proto_tree *) node)->first_child)
+ {
if (finfo->tree_type != -1)
printf(",\"e\":%d", finfo->tree_type);
printf(",\"n\":");
@@ -2827,7 +2828,7 @@ sharkd_session_process_frame_cb(epan_dissect_t *edt, proto_tree *tree, struct ep
if (data_src)
{
- struct data_source *src = (struct data_source *)data_src->data;
+ struct data_source *src = (struct data_source *) data_src->data;
const char *ds_sepa = NULL;
tvbuff_t *tvb;
@@ -2858,7 +2859,7 @@ sharkd_session_process_frame_cb(epan_dissect_t *edt, proto_tree *tree, struct ep
while (data_src)
{
- src = (struct data_source *)data_src->data;
+ src = (struct data_source *) data_src->data;
{
char *src_name = get_data_source_name(src);
@@ -2946,8 +2947,10 @@ sharkd_session_process_intervals(char *buf, const jsmntok_t *tokens, int count)
gint64 idx;
gint64 max_idx = 0;
- if (tok_interval) {
- if (!ws_strtou32(tok_interval, NULL, &interval_ms) || interval_ms == 0) {
+ if (tok_interval)
+ {
+ if (!ws_strtou32(tok_interval, NULL, &interval_ms) || interval_ms == 0)
+ {
fprintf(stderr, "Invalid interval parameter: %s.\n", tok_interval);
return;
}