From: squidadm Date: Wed, 14 Feb 2018 11:27:56 +0000 (+1300) Subject: Sourceformat Enforcement (#148) X-Git-Tag: M-staged-PR151~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f3a5731a04a7c0e8c1ebda5531edd3ac3a2b678c;p=thirdparty%2Fsquid.git Sourceformat Enforcement (#148) --- diff --git a/src/security/KeyData.cc b/src/security/KeyData.cc index 299f1b2051..23d1239544 100644 --- a/src/security/KeyData.cc +++ b/src/security/KeyData.cc @@ -1,5 +1,5 @@ /* - * Copyright (C) 1996-2017 The Squid Software Foundation and contributors + * Copyright (C) 1996-2018 The Squid Software Foundation and contributors * * Squid software is distributed under GPLv2+ license and includes * contributions from numerous individuals and organizations. @@ -62,9 +62,9 @@ Security::KeyData::loadX509CertFromFile() if (certificate) { cert = Security::CertPointer(certificate, [](gnutls_x509_crt_t p) { - debugs(83, 5, "gnutls_x509_crt_deinit cert=" << (void*)p); - gnutls_x509_crt_deinit(p); - }); + debugs(83, 5, "gnutls_x509_crt_deinit cert=" << (void*)p); + gnutls_x509_crt_deinit(p); + }); } #else @@ -148,9 +148,9 @@ Security::KeyData::loadX509PrivateKeyFromFile() gnutls_privkey_export_x509(key, &xkey); gnutls_privkey_deinit(key); pkey = Security::PrivateKeyPointer(xkey, [](gnutls_x509_privkey_t p) { - debugs(83, 5, "gnutls_x509_privkey_deinit pkey=" << (void*)p); - gnutls_x509_privkey_deinit(p); - }); + debugs(83, 5, "gnutls_x509_privkey_deinit pkey=" << (void*)p); + gnutls_x509_privkey_deinit(p); + }); } } gnutls_free(data.data); @@ -181,3 +181,4 @@ Security::KeyData::loadFromFiles(const AnyP::PortCfg &port, const char *portType chain.clear(); } } + diff --git a/src/security/ServerOptions.cc b/src/security/ServerOptions.cc index 6041c41d37..0f67f4f8d2 100644 --- a/src/security/ServerOptions.cc +++ b/src/security/ServerOptions.cc @@ -260,7 +260,7 @@ Security::ServerOptions::createStaticServerContext(AnyP::PortCfg &port) debugs(83, DBG_CRITICAL, "ERROR: Failed to initialize server context with keys from " << whichFile << ": " << Security::ErrorString(x)); return false; } - // XXX: add cert chain to the context + // XXX: add cert chain to the context } #endif diff --git a/src/security/cert_generators/file/security_file_certgen.cc b/src/security/cert_generators/file/security_file_certgen.cc index 6a14013007..e8a63472da 100644 --- a/src/security/cert_generators/file/security_file_certgen.cc +++ b/src/security/cert_generators/file/security_file_certgen.cc @@ -313,11 +313,11 @@ int main(int argc, char *argv[]) struct statvfs sfs; if (xstatvfs(db_path.c_str(), &sfs)) { - fs_block_size = 2048; + fs_block_size = 2048; } else { - fs_block_size = sfs.f_frsize; - // Sanity check; make sure we have a meaningful value. - if (fs_block_size < 512) + fs_block_size = sfs.f_frsize; + // Sanity check; make sure we have a meaningful value. + if (fs_block_size < 512) fs_block_size = 2048; } }