Bug 1049997 - Separate statements declaring multiple pointers into separate statements. r=froydnj

This commit is contained in:
Birunthan Mohanathas 2014-08-08 07:04:45 -07:00
parent 444cd1c72e
commit 3e8abfd2e8
10 changed files with 25 additions and 15 deletions

View File

@ -695,7 +695,8 @@ nsXULTemplateBuilder::UpdateResultInContainer(nsIXULTemplateResult* aOldResult,
// with a higher priority is active, the new match will override it, so
// content will need to be generated for the new match and removed for
// this existing active match.
nsTemplateMatch* replacedmatch = nullptr, * replacedmatchtodelete = nullptr;
nsTemplateMatch* replacedmatch = nullptr;
nsTemplateMatch* replacedmatchtodelete = nullptr;
if (aOldResult) {
nsTemplateMatch* firstmatch;

View File

@ -606,7 +606,8 @@ txXPathNodeUtils::comparePosition(const txXPathNode& aNode,
nsAutoTArray<nsINode*, 8> parents, otherParents;
nsINode* node = aNode.mNode;
nsINode* otherNode = aOtherNode.mNode;
nsINode* parent, *otherParent;
nsINode* parent;
nsINode* otherParent;
while (node && otherNode) {
parent = node->GetParentNode();
otherParent = otherNode->GetParentNode();

View File

@ -549,7 +549,8 @@ nsICODecoder::WriteInternal(const char* aBuffer, uint32_t aCount, DecodeStrategy
}
uint32_t* decoded = imageData + mCurLine * GetRealWidth();
uint32_t* decoded_end = decoded + GetRealWidth();
uint8_t* p = mRow, *p_end = mRow + rowSize;
uint8_t* p = mRow;
uint8_t* p_end = mRow + rowSize;
while (p < p_end) {
uint8_t idx = *p++;
for (uint8_t bit = 0x80; bit && decoded<decoded_end; bit >>= 1) {

View File

@ -351,7 +351,8 @@ nsPNGEncoder::ParseOptions(const nsAString& aOptions,
while (char* token = nsCRT::strtok(options, ";", &options)) {
// If there's an '=' character, split the token around it.
char* equals = token, *value = nullptr;
char* equals = token;
char* value = nullptr;
while(*equals != '=' && *equals) {
++equals;
}

View File

@ -1821,7 +1821,9 @@ MessageChannel::DumpInterruptStack(const char* const pfx) const
// print a python-style backtrace, first frame to last
for (uint32_t i = 0; i < mCxxStackFrames.length(); ++i) {
int32_t id;
const char* dir, *sems, *name;
const char* dir;
const char* sems;
const char* name;
mCxxStackFrames[i].Describe(&id, &dir, &sems, &name);
printf_stderr("%s[(%u) %s %s %s(actor=%d) ]\n", pfx,

View File

@ -1990,7 +1990,8 @@ nsresult nsBidiPresUtils::ProcessText(const char16_t* aText,
*/
nscoord subWidth;
// The position in the text where this run's "left part" begins.
const char16_t* visualLeftPart, *visualRightSide;
const char16_t* visualLeftPart;
const char16_t* visualRightSide;
if (level & 1) {
// One day, son, this could all be replaced with mBidiEngine.GetVisualIndex ...
posResolve->visualIndex = visualStart + (subRunLength - (posResolve->logicalIndex + 1 - start));

View File

@ -9448,7 +9448,8 @@ CompareTrees(nsPresContext* aFirstPresContext, nsIFrame* aFirstFrame,
}
nsIntRect r1, r2;
nsView* v1, *v2;
nsView* v1;
nsView* v2;
for (nsFrameList::Enumerator e1(kids1), e2(kids2);
;
e1.Next(), e2.Next()) {

View File

@ -328,7 +328,8 @@ nsMenuBarFrame::ChangeMenuItem(nsMenuFrame* aMenuItem,
if (pm && pm->HasContextMenu(nullptr))
return NS_OK;
nsIContent* aOldMenu = nullptr, *aNewMenu = nullptr;
nsIContent* aOldMenu = nullptr;
nsIContent* aNewMenu = nullptr;
// Unset the current child.
bool wasOpen = false;

View File

@ -1159,7 +1159,8 @@ CompressWhitespace(nsAString& aString)
char16_t* start;
uint32_t len = NS_StringGetMutableData(aString, UINT32_MAX, &start);
char16_t* end = start + len;
char16_t* from = start, *to = start;
char16_t* from = start;
char16_t* to = start;
// Skip any leading whitespace
while (from < end && NS_IsAsciiWhitespace(*from)) {

View File

@ -177,12 +177,12 @@ static void ReplaceSubstring( nsACString& str,
const nsACString& matchVal,
const nsACString& newVal )
{
const char* sp, *mp, *np;
uint32_t sl, ml, nl;
sl = NS_CStringGetData(str, &sp);
ml = NS_CStringGetData(matchVal, &mp);
nl = NS_CStringGetData(newVal, &np);
const char* sp;
const char* mp;
const char* np;
uint32_t sl = NS_CStringGetData(str, &sp);
uint32_t ml = NS_CStringGetData(matchVal, &mp);
uint32_t nl = NS_CStringGetData(newVal, &np);
for (const char* iter = sp; iter <= sp + sl - ml; ++iter)
{