Bug 1405598 - Restyle prefread.cpp (clang-format 3). r=glandium.
MozReview-Commit-ID: 6tY9GE0gIc3
--- a/modules/libpref/prefread.cpp
+++ b/modules/libpref/prefread.cpp
@@ -433,27 +433,28 @@ PREF_ParseBuf(PrefParseState* aPS, const
case 'n':
c = '\n';
break;
case 'x': // hex escape -- always interpreted as Latin-1
case 'u': // UTF16 escape
aPS->esctmp[0] = c;
aPS->esclen = 1;
aPS->utf16[0] = aPS->utf16[1] = 0;
- aPS->sindex = (c == 'x') ? HEX_ESC_NUM_DIGITS : UTF16_ESC_NUM_DIGITS;
+ aPS->sindex =
+ (c == 'x') ? HEX_ESC_NUM_DIGITS : UTF16_ESC_NUM_DIGITS;
state = PREF_PARSE_HEX_ESCAPE;
continue;
default:
pref_ReportParseProblem(
*aPS, "preserving unexpected JS escape sequence", lineNum, false);
NS_WARNING("preserving unexpected JS escape sequence");
// Invalid escape sequence so we do have to write more than one
// character. Grow line buffer if necessary...
if ((aPS->lbcur + 1) == aPS->lbend && !pref_GrowBuf(aPS)) {
- return false; // out of memory
+ return false; // out of memory
}
*aPS->lbcur++ = '\\'; // preserve the escape sequence
break;
}
*aPS->lbcur++ = c;
state = PREF_PARSE_QUOTED_STRING;
break;
@@ -462,18 +463,20 @@ PREF_ParseBuf(PrefParseState* aPS, const
if (c >= '0' && c <= '9') {
udigit = (c - '0');
} else if (c >= 'A' && c <= 'F') {
udigit = (c - 'A') + 10;
} else if (c >= 'a' && c <= 'f') {
udigit = (c - 'a') + 10;
} else {
// bad escape sequence found, write out broken escape as-is
- pref_ReportParseProblem(
- *aPS, "preserving invalid or incomplete hex escape", lineNum, false);
+ pref_ReportParseProblem(*aPS,
+ "preserving invalid or incomplete hex escape",
+ lineNum,
+ false);
NS_WARNING("preserving invalid or incomplete hex escape");
*aPS->lbcur++ = '\\'; // original escape slash
if ((aPS->lbcur + aPS->esclen) >= aPS->lbend && !pref_GrowBuf(aPS)) {
return false;
}
for (int i = 0; i < aPS->esclen; ++i) {
*aPS->lbcur++ = aPS->esctmp[i];
}