diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1997a9be57..7bff7ff2b4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ # repos: - repo: https://github.com/pre-commit/mirrors-clang-format - rev: 'v18.1.8' + rev: 'v19.1.4' hooks: - id: clang-format types_or: diff --git a/src/DNS_Mgr.cc b/src/DNS_Mgr.cc index 2bb2ba435e..42948accef 100644 --- a/src/DNS_Mgr.cc +++ b/src/DNS_Mgr.cc @@ -318,7 +318,7 @@ static void addrinfo_cb(void* arg, int status, int timeouts, struct ares_addrinf // Push a null on the end so the addr list has a final point during later parsing. addrs.push_back(NULL); - struct hostent he {}; + struct hostent he{}; he.h_name = util::copy_string(result->name); he.h_addrtype = AF_INET; he.h_length = sizeof(in_addr); @@ -333,7 +333,7 @@ static void addrinfo_cb(void* arg, int status, int timeouts, struct ares_addrinf // Push a null on the end so the addr list has a final point during later parsing. addrs6.push_back(NULL); - struct hostent he {}; + struct hostent he{}; he.h_name = util::copy_string(result->name); he.h_addrtype = AF_INET6; he.h_length = sizeof(in6_addr); @@ -370,7 +370,7 @@ static void query_cb(void* arg, ares_status_t status, size_t timeouts, const are } } else { - struct hostent he {}; + struct hostent he{}; uint32_t ttl = 0; size_t rr_cnt = ares_dns_record_rr_cnt(dnsrec, ARES_SECTION_ANSWER); diff --git a/src/Debug.cc b/src/Debug.cc index 6609a3d256..66e11b5e50 100644 --- a/src/Debug.cc +++ b/src/Debug.cc @@ -417,7 +417,7 @@ int dbg_init_debugger(const char* cmdfile) { // ### Implement this debug_msg("Command files not supported. Using interactive mode.\n"); - // ### if ( interactive ) (i.e., not reading cmds from a file) + // ### if ( interactive ) (i.e., not reading cmds from a file) #ifdef HAVE_READLINE init_readline(); #endif diff --git a/src/file_analysis/analyzer/x509/X509.cc b/src/file_analysis/analyzer/x509/X509.cc index aefdf2738c..2dab26e25a 100644 --- a/src/file_analysis/analyzer/x509/X509.cc +++ b/src/file_analysis/analyzer/x509/X509.cc @@ -308,9 +308,9 @@ void X509::ParseExtensionsSpecific(X509_EXTENSION* ex, bool global, ASN1_OBJECT* else if ( OBJ_obj2nid(ext_asn) == NID_subject_alt_name ) ParseSAN(ex); - // In OpenSSL 1.0.2+, we can get the extension by using NID_ct_precert_scts. - // In OpenSSL <= 1.0.1, this is not yet defined yet, so we have to manually - // look it up by performing a string comparison on the oid. + // In OpenSSL 1.0.2+, we can get the extension by using NID_ct_precert_scts. + // In OpenSSL <= 1.0.1, this is not yet defined yet, so we have to manually + // look it up by performing a string comparison on the oid. #ifdef NID_ct_precert_scts else if ( OBJ_obj2nid(ext_asn) == NID_ct_precert_scts ) #else diff --git a/src/script_opt/CPP/RuntimeVec.cc b/src/script_opt/CPP/RuntimeVec.cc index 62eed2dde2..fc5ccc6f1f 100644 --- a/src/script_opt/CPP/RuntimeVec.cc +++ b/src/script_opt/CPP/RuntimeVec.cc @@ -82,8 +82,7 @@ static VectorTypePtr base_vector_type__CPP(const VectorTypePtr& vt, bool is_bool // Instantiates a double_kernel for a given operation. #define VEC_OP1_WITH_DOUBLE(name, op) \ VEC_OP1( \ - name, op, case TYPE_INTERNAL_DOUBLE \ - : { \ + name, op, case TYPE_INTERNAL_DOUBLE : { \ VEC_OP1_KERNEL(AsDouble, DoubleVal, op) \ break; \ })