formatting

This commit is contained in:
John
2023-01-06 12:31:29 +01:00
parent 672dae22e7
commit b42b798e54
2 changed files with 6 additions and 4 deletions
+4 -3
View File
@@ -1078,7 +1078,8 @@ result_t loadDefinitionsFromConfigPath(FileReader* reader, const string& filenam
stream = FileReader::openFile(s_configLocalPrefix + filename, errorDescription, &mtime); stream = FileReader::openFile(s_configLocalPrefix + filename, errorDescription, &mtime);
} else { } else {
string content; string content;
if (lazyHttpClient() && s_configHttpClient->get(s_configUriPrefix + filename + s_configLangQuery, "", &content, &mtime)) { if (lazyHttpClient()
&& s_configHttpClient->get(s_configUriPrefix + filename + s_configLangQuery, "", &content, &mtime)) {
stream = new istringstream(content); stream = new istringstream(content);
} }
} }
@@ -1412,7 +1413,7 @@ int main(int argc, char* argv[], char* envp[]) {
string proto, configHost; string proto, configHost;
if (!HttpClient::parseUrl(s_configPath, &proto, &configHost, &configPort, &s_configUriPrefix)) { if (!HttpClient::parseUrl(s_configPath, &proto, &configHost, &configPort, &s_configUriPrefix)) {
#ifndef HAVE_SSL #ifndef HAVE_SSL
if (proto=="https") { if (proto == "https") {
logError(lf_main, "invalid configPath URL (HTTPS not supported)"); logError(lf_main, "invalid configPath URL (HTTPS not supported)");
return EINVAL; return EINVAL;
} }
@@ -1433,7 +1434,7 @@ int main(int argc, char* argv[], char* envp[]) {
s_configHttpClient->disconnect(); s_configHttpClient->disconnect();
} }
const string lang = MappedFileReader::normalizeLanguage( const string lang = MappedFileReader::normalizeLanguage(
s_opt.preferLanguage==nullptr || !s_opt.preferLanguage[0] ? "" : s_opt.preferLanguage s_opt.preferLanguage == nullptr || !s_opt.preferLanguage[0] ? "" : s_opt.preferLanguage
); );
if (!lang.empty()) { if (!lang.empty()) {
s_configLangQuery = "?l=" + lang; s_configLangQuery = "?l=" + lang;
+2 -1
View File
@@ -256,7 +256,8 @@ string Device::getEnhancedInfos() {
if (res != RESULT_OK) { if (res != RESULT_OK) {
m_enhInfoBusVoltage = "bus voltage unknown"; m_enhInfoBusVoltage = "bus voltage unknown";
} }
return "firmware " + m_enhInfoVersion + ", " + m_enhInfoTemperature + ", " + m_enhInfoSupplyVoltage + ", " + m_enhInfoBusVoltage; return "firmware " + m_enhInfoVersion + ", " + m_enhInfoTemperature + ", " + m_enhInfoSupplyVoltage + ", "
+ m_enhInfoBusVoltage;
} }
result_t Device::send(symbol_t value) { result_t Device::send(symbol_t value) {