diff options
| author | Mosder <xmosder12@gmail.com> | 2026-07-31 20:59:31 +0200 |
|---|---|---|
| committer | Mosder <xmosder12@gmail.com> | 2026-07-31 20:59:31 +0200 |
| commit | ad5eb982de97d982bc808ece89903d1113ab9917 (patch) | |
| tree | acbb6865248f14d4faa16759943cefcceb94667b /analyzer/utils | |
| parent | 4624152ac63ca3b4cbba0998d54fb0da84daef8c (diff) | |
refactor: apparently when you add , after last item in struct initalization it doesn't get formatted like shit by clang. crazy shit
Diffstat (limited to 'analyzer/utils')
| -rw-r--r-- | analyzer/utils/tcp.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/analyzer/utils/tcp.c b/analyzer/utils/tcp.c index add2a76..a5d0366 100644 --- a/analyzer/utils/tcp.c +++ b/analyzer/utils/tcp.c @@ -12,15 +12,12 @@ // initalize default TCP segment TCPSegment new_segment() { - // clang-format off - TCPSegment segment = { + return (TCPSegment){ .payload = NULL, .len = 0, .seq = 0, - .port = 0 + .port = 0, }; - // clang-format on - return segment; } // segments compare function to use with heap @@ -75,16 +72,13 @@ TCPSegment get_segment_from_packet(const byte_t *packet, const struct pcap_pkthd } TCPStream new_stream(ConnectionSource src) { - // clang-format off - TCPStream stream = { + return (TCPStream){ .bytes = array_new(1, INIT_STREAM_CAPACITY, NULL), .seq = 0, .port = 0, .src = src, - .pending = NULL + .pending = NULL, }; - // clang-format on - return stream; } void destroy_stream(TCPStream stream) { |
