Coding style fixes

This commit is contained in:
Felipe Zimmerle
2017-11-13 14:22:17 -03:00
parent 023e7acbad
commit 3fb71f32d8
40 changed files with 591 additions and 662 deletions

View File

@@ -16,23 +16,25 @@
#include "src/operators/verify_ssn.h"
#include <string>
#include <memory>
#include <list>
#include "src/operators/operator.h"
namespace modsecurity {
namespace operators {
int VerifySSN::convert_to_int(const char c)
{
int VerifySSN::convert_to_int(const char c) {
int n;
if ((c>='0') && (c<='9'))
if ((c >= '0') && (c <= '9')) {
n = c - '0';
else if ((c>='A') && (c<='F'))
} else if ((c >= 'A') && (c <= 'F')) {
n = c - 'A' + 10;
else if ((c>='a') && (c<='f'))
} else if ((c >= 'a') && (c <= 'f')) {
n = c - 'a' + 10;
else
} else {
n = 0;
}
return n;
}