removed some (Uint32)-1 casts

parent 76231371
...@@ -746,14 +746,15 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr, ...@@ -746,14 +746,15 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr,
//-------------------------------------------------------------------- //--------------------------------------------------------------------
// Read Primary Key Values // Read Primary Key Values
//-------------------------------------------------------------------- //--------------------------------------------------------------------
noPrimKey = readAttributes(pagep.p, int ret= readAttributes(pagep.p,
tupheadoffset, tupheadoffset,
&tableDescriptor[regTabPtr->readKeyArray].tabDescr, &tableDescriptor[regTabPtr->readKeyArray].tabDescr,
regTabPtr->noOfKeyAttr, regTabPtr->noOfKeyAttr,
keyBuffer, keyBuffer,
ZATTR_BUFFER_SIZE, ZATTR_BUFFER_SIZE,
true); true);
ndbrequire(noPrimKey != (Uint32)-1); ndbrequire(ret != -1);
noPrimKey= ret;
Uint32 numAttrsToRead; Uint32 numAttrsToRead;
if ((regOperPtr->optype == ZUPDATE) && if ((regOperPtr->optype == ZUPDATE) &&
...@@ -788,14 +789,15 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr, ...@@ -788,14 +789,15 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr,
if ((regOperPtr->optype != ZDELETE) || if ((regOperPtr->optype != ZDELETE) ||
(trigPtr->sendBeforeValues)) { (trigPtr->sendBeforeValues)) {
ljam(); ljam();
noMainWords = readAttributes(pagep.p, int ret= readAttributes(pagep.p,
tupheadoffset, tupheadoffset,
&readBuffer[0], &readBuffer[0],
numAttrsToRead, numAttrsToRead,
mainBuffer, mainBuffer,
ZATTR_BUFFER_SIZE, ZATTR_BUFFER_SIZE,
true); true);
ndbrequire(noMainWords != (Uint32)-1); ndbrequire(ret != -1);
noMainWords= ret;
} else { } else {
ljam(); ljam();
noMainWords = 0; noMainWords = 0;
...@@ -813,7 +815,7 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr, ...@@ -813,7 +815,7 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr,
pagep.i = regOperPtr->realPageIdC; pagep.i = regOperPtr->realPageIdC;
ptrCheckGuard(pagep, cnoOfPage, page); ptrCheckGuard(pagep, cnoOfPage, page);
noCopyWords = readAttributes(pagep.p, int ret= readAttributes(pagep.p,
tupheadoffset, tupheadoffset,
&readBuffer[0], &readBuffer[0],
numAttrsToRead, numAttrsToRead,
...@@ -821,7 +823,8 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr, ...@@ -821,7 +823,8 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr,
ZATTR_BUFFER_SIZE, ZATTR_BUFFER_SIZE,
true); true);
ndbrequire(noCopyWords != (Uint32)-1); ndbrequire(ret != -1);
noCopyWords = ret;
if ((noMainWords == noCopyWords) && if ((noMainWords == noCopyWords) &&
(memcmp(mainBuffer, copyBuffer, noMainWords << 2) == 0)) { (memcmp(mainBuffer, copyBuffer, noMainWords << 2) == 0)) {
//-------------------------------------------------------------------- //--------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment