mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 13:26:01 +03:00
Fix SonarCloud errors
This commit is contained in:
parent
6637569d03
commit
68161a4b4d
@ -71,9 +71,9 @@ using modsecurity::audit_log::AuditLog;
|
||||
/** @ingroup ModSecurity_CPP_API */
|
||||
class ConfigInt {
|
||||
public:
|
||||
ConfigInt() : m_set(false), m_value(0) { }
|
||||
bool m_set;
|
||||
int m_value;
|
||||
bool m_set = false;
|
||||
int m_value = 0;
|
||||
ConfigInt() = default;
|
||||
|
||||
void merge(const ConfigInt *from) {
|
||||
if (m_set == true || from->m_set == false) {
|
||||
@ -87,9 +87,9 @@ class ConfigInt {
|
||||
|
||||
class ConfigUnsignedInt {
|
||||
public:
|
||||
ConfigUnsignedInt() : m_set(false), m_value(0) { }
|
||||
bool m_set;
|
||||
unsigned int m_value;
|
||||
bool m_set = false;
|
||||
unsigned int m_value = 0;
|
||||
ConfigUnsignedInt() = default;
|
||||
|
||||
void merge(const ConfigUnsignedInt *from) {
|
||||
if (m_set == true || from->m_set == false) {
|
||||
@ -104,9 +104,9 @@ class ConfigUnsignedInt {
|
||||
|
||||
class ConfigDouble {
|
||||
public:
|
||||
ConfigDouble() : m_set(false), m_value(0) { }
|
||||
bool m_set;
|
||||
double m_value;
|
||||
bool m_set = false;
|
||||
double m_value = 0.0;
|
||||
ConfigDouble() = default;
|
||||
|
||||
void merge(const ConfigDouble *from) {
|
||||
if (m_set == true || from->m_set == false) {
|
||||
@ -121,9 +121,9 @@ class ConfigDouble {
|
||||
|
||||
class ConfigString {
|
||||
public:
|
||||
ConfigString() : m_set(false), m_value("") { }
|
||||
bool m_set;
|
||||
std::string m_value;
|
||||
bool m_set = false;
|
||||
std::string m_value = "";
|
||||
ConfigString() = default;
|
||||
|
||||
void merge(const ConfigString *from) {
|
||||
if (m_set == true || from->m_set == false) {
|
||||
@ -138,10 +138,10 @@ class ConfigString {
|
||||
|
||||
class ConfigSet {
|
||||
public:
|
||||
ConfigSet() : m_set(false), m_clear(false) { }
|
||||
bool m_set;
|
||||
bool m_clear;
|
||||
bool m_set = false;
|
||||
bool m_clear = false;
|
||||
std::set<std::string> m_value;
|
||||
ConfigSet() = default;
|
||||
};
|
||||
|
||||
|
||||
|
@ -278,7 +278,7 @@ inline std::string toupper(std::string str) { // cppcheck-suppress passedByValue
|
||||
}
|
||||
|
||||
inline int parse_unsigned_int(const std::string &a, unsigned int *res) {
|
||||
char *endptr = NULL;
|
||||
char *endptr = nullptr;
|
||||
errno = 0;
|
||||
|
||||
unsigned long val = strtoul(a.c_str(), &endptr, 10);
|
||||
|
Loading…
x
Reference in New Issue
Block a user