Commit graph

17 commits

Author SHA1 Message Date
Benjamin Bannier
627c3ad726 Fix clang-tidy readability-isolate-declaration warnings
I missed one of these in review so a machine is probably better at
catching them.

I fixed the existing instances which where largely in code which look
dated. Where possible I slightly reorganized the code so we do not have
to leave values uninitialized, but did not touch up anything else.
2025-06-30 14:19:06 -07:00
Tim Wojtulewicz
ee319fc1c5 Fix clang-tidy modernize-use-nullptr findings 2025-06-06 11:43:06 -07:00
Tim Wojtulewicz
1992a55798 Use SCN* constants when reading into sized integer types 2025-05-27 12:03:45 -07:00
Tim Wojtulewicz
ae2ff9901b Fix clang-tidy bugprone-unsafe-functions warnings 2025-05-27 11:58:27 -07:00
Tim Wojtulewicz
e618d00326 Remove including <cinttypes> from util.h 2025-05-16 10:14:37 -07:00
Arne Welzel
9619cd0f17 Add missing copyright line to headers and cc files 2024-12-06 12:50:58 +01:00
Arne Welzel
0f1c1cb754 clang-format: Sort doctest header at the bottom 2024-11-15 17:00:00 +01:00
Benjamin Bannier
f5a76c1aed Reformat Zeek in Spicy style
This largely copies over Spicy's `.clang-format` configuration file. The
one place where we deviate is header include order since Zeek depends on
headers being included in a certain order.
2023-10-30 09:40:55 +01:00
Tim Wojtulewicz
64b78f6fb9 Use emplace_back over push_back where appropriate 2023-07-07 09:17:05 -07:00
Tomer Lev
73e749a162 Clang format again but now with v13.0.1 2022-11-09 18:56:00 +02:00
Tim Wojtulewicz
bf06cc9c2f Turn on unit tests by default, and ifdef out a few of them 2022-11-09 18:16:13 +02:00
Tim Wojtulewicz
e28d561f79 Fixes Coverity issues reported from DNS_Mgr merge
Reports fixed: 1488295, 1488292, 1488281, 1488279
2022-05-03 09:49:47 -07:00
Tim Wojtulewicz
c4cac72fd7 Use shared_ptrs for DNS_Mapping objects 2022-04-22 13:10:37 -07:00
Tim Wojtulewicz
e8f833b8a6 Store all mappings in a single map instead of split by type
This opens up the possibility of storing other request types outside
of T_A, T_PTR and T_TXT without requiring redoing the caching. It
also fixes the caching code in DNS_Mapping, adding a version number
to the start of the cache file so the cache structure can be modified
and old caches invalidated more easily.
2022-04-22 13:10:37 -07:00
Tim Wojtulewicz
3bdc744b14 Add merging to DNS_Mgr::AddResult() to support both ipv4 and ipv6 responses simultaneously 2022-04-22 13:10:37 -07:00
Tim Wojtulewicz
9f197aa458 Rework DNS_Mgr API to be more consistent and to support more request types 2022-04-22 13:10:37 -07:00
Tim Wojtulewicz
e6e9144da6 Add unit testing for DNS_Mgr and related classes 2022-04-22 13:10:37 -07:00