aboutsummaryrefslogtreecommitdiff
path: root/analyzer/analyzer.c
diff options
context:
space:
mode:
authorMosder <git@mosder.eu>2026-09-15 15:52:47 +0200
committerMosder <git@mosder.eu>2026-09-15 15:52:47 +0200
commit451a320920c6e2f60445938aa98d4fe817c3d36a (patch)
tree02e6b7bd9a6e2824ef332b0143c98348ff8c85b3 /analyzer/analyzer.c
parentad5eb982de97d982bc808ece89903d1113ab9917 (diff)
formatting: run codebase through new .clang-formatHEADmaster
Diffstat (limited to 'analyzer/analyzer.c')
-rw-r--r--analyzer/analyzer.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/analyzer/analyzer.c b/analyzer/analyzer.c
index 194ac5c..fc64957 100644
--- a/analyzer/analyzer.c
+++ b/analyzer/analyzer.c
@@ -24,7 +24,8 @@ void cleanup_str_pointer(void *str_pointer) {
// initalize new total rewards
TotalRewards new_total_rewards() {
- HashMap *saturations = hashmap_new(sizeof(const char *), sizeof(int), hash_str, compare_strs, NULL, NULL);
+ HashMap *saturations =
+ hashmap_new(sizeof(const char *), sizeof(int), hash_str, compare_strs, NULL, NULL);
TotalRewards rewards = {
.exp = 0,
.gold = 0,
@@ -38,7 +39,9 @@ TotalRewards new_total_rewards() {
// initalize file analysis state
FileAnalState init_file_anal_state() {
- HashMap *characters = hashmap_new(sizeof(char *), sizeof(TotalRewards), hash_str, compare_strs, NULL, cleanup_total_rewards);
+ HashMap *characters = hashmap_new(
+ sizeof(char *), sizeof(TotalRewards), hash_str, compare_strs, NULL, cleanup_total_rewards
+ );
FileAnalState state = {.fight_count = 0, .curr_character = {0}, .characters = characters};
return state;
}
@@ -114,7 +117,11 @@ void file_parsed_data_handler(void *state, DynArray parsed_data) {
// loop through packets received from pcap_handle and analyze the TCP streams
void analyzer_loop(
- TCPStream *server_stream, TCPStream *client_stream, pcap_t *pcap_handle, void *state, void (*parsed_data_handler)(void *state, DynArray parsed_data)
+ TCPStream *server_stream,
+ TCPStream *client_stream,
+ pcap_t *pcap_handle,
+ void *state,
+ void (*parsed_data_handler)(void *state, DynArray parsed_data)
) {
// read packets from handle
struct pcap_pkthdr *packet_data;