Skip to content

Commit 6db4099

Browse files
authored
Update webserver.cpp
Correct for formatting issues highlighted by cpplint.
1 parent 454447f commit 6db4099

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/webserver.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,13 @@ void webserver::sweet_kill() {
182182
}
183183

184184
void webserver::psk_cred_handler_func(void* cls, const struct MHD_Connection*, const char* username, void** psk, size_t* psk_size) {
185-
[[maybe_unused]] std::string key = std::invoke(static_cast<const webserver*>(cls)->psk_cred_handler,username);
185+
[[maybe_unused]] std::string key = std::invoke(static_cast<const webserver*>(cls)->psk_cred_handler, username);
186186

187187
#ifdef HAVE_GNUTLS
188188
*psk_size = key.length();
189189
*psk = malloc(*psk_size);
190190

191-
if (gnutls_hex2bin(key.data(),key.length(),*psk,psk_size) != GNUTLS_E_SUCCESS)
191+
if (gnutls_hex2bin(key.data(), key.length(), *psk,psk_size) != GNUTLS_E_SUCCESS)
192192
*psk_size = 0;
193193
#endif
194194
}
@@ -227,7 +227,7 @@ bool webserver::start(bool blocking) {
227227
} gen;
228228
vector<struct MHD_OptionItem> iov;
229229

230-
// Must be assigned first to options to ensure that all output is handled by external logger!
230+
// Must be assigned first to options to ensure that all output is handled by external logger!
231231
iov.push_back(gen(MHD_OPTION_EXTERNAL_LOGGER, (intptr_t) &error_log, this));
232232

233233
iov.push_back(gen(MHD_OPTION_NOTIFY_COMPLETED, (intptr_t) &request_completed, nullptr));
@@ -295,9 +295,9 @@ bool webserver::start(bool blocking) {
295295
if (cred_type != http_utils::NONE && use_ssl) {
296296
iov.push_back(gen(MHD_OPTION_HTTPS_CRED_TYPE, cred_type));
297297
}
298-
298+
299299
if (psk_cred_handler && use_ssl) {
300-
iov.push_back(gen(MHD_OPTION_GNUTLS_PSK_CRED_HANDLER,(intptr_t) psk_cred_handler_func, this));
300+
iov.push_back(gen(MHD_OPTION_GNUTLS_PSK_CRED_HANDLER, (intptr_t) psk_cred_handler_func, this));
301301
}
302302
#endif // HAVE_GNUTLS
303303

0 commit comments

Comments
 (0)