8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 06:03:02 +01:00
This commit is contained in:
asfernandes 2008-12-25 14:25:01 +00:00
parent 5bb1c3792f
commit 5a85277726
6 changed files with 10 additions and 10 deletions

View File

@ -393,7 +393,7 @@ void* MemoryPool::external_alloc(size_t &size)
{
// This method is assumed to return NULL in case it cannot alloc
size = FB_ALIGN(size, get_map_page_size());
void *result = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
void* result = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
// Let Valgrind forget that block was zero-initialized
VALGRIND_DISCARD(VALGRIND_MAKE_WRITABLE(result, size));
return result;
@ -1020,7 +1020,7 @@ static void print_block(FILE *file, MemoryBlock *blk, bool used_only,
if (blk->mbk_flags & MBK_DELAYED)
strcat(flags, " DELAYED");
const int size =
const int size =
blk->mbk_flags & MBK_LARGE ? blk->mbk_large_length : blk->mbk_small.mbk_length;
if (blk->mbk_flags & MBK_USED)

View File

@ -437,9 +437,7 @@ private:
while (l1)
{
if (matches(pool, obj, p1++, l1-- * sizeof(CharType), p2, l2 * sizeof(CharType)))
{
return true;
}
}
return false;
}
@ -743,7 +741,7 @@ private:
// if we've got the definition of a quote character,
// slurp the next character too
if (comb > combined && comb[-1] == *(CharType*) obj->getCanonicalChar(CHAR_GDML_QUOTE)
if (comb > combined && comb[-1] == *(CharType*) obj->getCanonicalChar(CHAR_GDML_QUOTE)
&& *match)
{
*comb++ = *match++;

View File

@ -740,7 +740,7 @@ Service::Service(const TEXT* service_name, USHORT spb_length, const UCHAR* spb_d
const string remote = options.spb_network_protocol +
(options.spb_network_protocol.isEmpty() ||
options.spb_remote_address.isEmpty() ? "" : "/") +
options.spb_remote_address.isEmpty() ? "" : "/") +
options.spb_remote_address;
SecurityDatabase::verifyUser(name, options.spb_user_name.nullStr(),

View File

@ -3367,8 +3367,8 @@ static jrd_tra* transaction_start(thread_db* tdbb, jrd_tra* temp)
if (dbb->dbb_sweep_interval &&
!(tdbb->getAttachment()->att_flags & ATT_no_cleanup) &&
(trans->tra_oldest_active - trans->tra_oldest > dbb->dbb_sweep_interval)
&& oldest_state != tra_limbo)
(trans->tra_oldest_active - trans->tra_oldest > dbb->dbb_sweep_interval) &&
oldest_state != tra_limbo)
{
// Why nobody checks the result? Changed the function to return nothing.
start_sweeper(tdbb, dbb);

View File

@ -1597,7 +1597,7 @@ static RTN walk_index(thread_db* tdbb, vdr* control, jrd_rel* relation,
// sorted on recordnumber, except for NULL keys.
if (useAllRecordNumbers && down_page->btr_left_sibling &&
!(downNode.isEndBucket || downNode.isEndLevel) &&
(!unique || nullKeyNode) )
(!unique || nullKeyNode))
{
// Check record number if key is equal with node on
// pointer page. In that case record number on page
@ -1781,8 +1781,10 @@ static RTN walk_pointer_page(thread_db* tdbb,
#ifdef DEBUG_VAL_VERBOSE
if (VAL_debug_level)
{
fprintf(stdout, "walk_pointer_page: page %d relation %d sequence %d\n",
(*vector)[sequence], relation->rel_id, sequence);
}
#endif
/* Give the page a quick once over */

View File

@ -3177,7 +3177,7 @@ bool VIO_writelock(thread_db* tdbb, record_param* org_rpb, RecordSource* rsb, jr
PageStack stack;
switch (prepare_update(tdbb, transaction, org_rpb->rpb_transaction_nr, org_rpb, &temp, 0,
stack, true))
stack, true))
{
case PREPARE_CONFLICT:
org_rpb->rpb_stream_flags |= RPB_s_refetch;