8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 03:23:03 +01:00
if<space>(
for<space>(
switch<space>(
while<space>(
This commit is contained in:
robocop 2004-10-04 08:15:00 +00:00
parent af7009beab
commit ed17cfafbf
24 changed files with 64 additions and 64 deletions

View File

@ -27,7 +27,7 @@
* *
*____________________________________________________________ *____________________________________________________________
* *
* $Id: alice_meta.epp,v 1.41 2004-08-26 18:22:40 brodsom Exp $ * $Id: alice_meta.epp,v 1.42 2004-10-04 08:14:34 robocop Exp $
*/ */
#include "firebird.h" #include "firebird.h"
@ -318,7 +318,7 @@ static TDR get_description(ISC_QUAD* blob_id)
const USHORT length = snarf_blob(blob_id, (USHORT) sizeof(buffer), buffer); const USHORT length = snarf_blob(blob_id, (USHORT) sizeof(buffer), buffer);
if (length) { if (length) {
p = bigger_buffer = (TEXT *) gds__alloc((SLONG) length); p = bigger_buffer = (TEXT *) gds__alloc((SLONG) length);
if(!p) { if (!p) {
tdgbl->status[0] = isc_arg_gds; tdgbl->status[0] = isc_arg_gds;
tdgbl->status[1] = isc_virmemexh; tdgbl->status[1] = isc_virmemexh;
tdgbl->status[2] = isc_arg_end; tdgbl->status[2] = isc_arg_end;

View File

@ -24,7 +24,7 @@
// //
//____________________________________________________________ //____________________________________________________________
// //
// $Id: exe.cpp,v 1.38 2004-09-01 14:51:33 alexpeshkoff Exp $ // $Id: exe.cpp,v 1.39 2004-10-04 08:14:34 robocop Exp $
// //
// 2001.07.06 Sean Leyne - Code Cleanup, removed "#ifdef READONLY_DATABASE" // 2001.07.06 Sean Leyne - Code Cleanup, removed "#ifdef READONLY_DATABASE"
// conditionals, as the engine now fully supports // conditionals, as the engine now fully supports
@ -298,7 +298,7 @@ static USHORT build_dpb(UCHAR* dpb, const ULONG switches)
*dpb2 |= isc_dpb_shut_force; *dpb2 |= isc_dpb_shut_force;
else if (switches & sw_tran) else if (switches & sw_tran)
*dpb2 |= isc_dpb_shut_transaction; *dpb2 |= isc_dpb_shut_transaction;
switch(tdgbl->ALICE_data.ua_shutdown_mode) { switch (tdgbl->ALICE_data.ua_shutdown_mode) {
case SHUT_NORMAL: case SHUT_NORMAL:
*dpb2 |= isc_dpb_shut_normal; *dpb2 |= isc_dpb_shut_normal;
break; break;
@ -327,7 +327,7 @@ static USHORT build_dpb(UCHAR* dpb, const ULONG switches)
*dpb2++ = isc_dpb_online; *dpb2++ = isc_dpb_online;
*dpb2++ = 1; *dpb2++ = 1;
*dpb2 = 0; *dpb2 = 0;
switch(tdgbl->ALICE_data.ua_shutdown_mode) { switch (tdgbl->ALICE_data.ua_shutdown_mode) {
case SHUT_NORMAL: case SHUT_NORMAL:
*dpb2 |= isc_dpb_shut_normal; *dpb2 |= isc_dpb_shut_normal;
break; break;

View File

@ -23,7 +23,7 @@
* All Rights Reserved. * All Rights Reserved.
* Contributor(s): ______________________________________. * Contributor(s): ______________________________________.
* *
* $Id: alloc.cpp,v 1.69 2004-09-28 06:27:16 skidder Exp $ * $Id: alloc.cpp,v 1.70 2004-10-04 08:14:43 robocop Exp $
* *
*/ */
@ -721,7 +721,7 @@ bool MemoryPool::verify_pool(bool fast_checks_only) {
// Check block length // Check block length
mem_assert(blk->small.mbk_length == current->bli_length); mem_assert(blk->small.mbk_length == current->bli_length);
} }
} while(freeBlocks.getNext()); } while (freeBlocks.getNext());
// check each block in each segment for consistency with free blocks structure // check each block in each segment for consistency with free blocks structure
for (MemoryExtent *extent = extents; extent; extent = extent->mxt_next) { for (MemoryExtent *extent = extents; extent; extent = extent->mxt_next) {

View File

@ -24,7 +24,7 @@
* Contributor(s): ______________________________________. * Contributor(s): ______________________________________.
* *
* *
* $Id: class_test.cpp,v 1.23 2004-09-28 06:27:16 skidder Exp $ * $Id: class_test.cpp,v 1.24 2004-10-04 08:14:44 robocop Exp $
* *
*/ */
@ -314,7 +314,7 @@ void testBePlusTree() {
printf("Check that tree(13) contains test data: "); printf("Check that tree(13) contains test data: ");
for (i = 0; i < v.getCount(); i++) { for (i = 0; i < v.getCount(); i++) {
if(!tree2.locate(locEqual, v[i])) if (!tree2.locate(locEqual, v[i]))
passed = false; passed = false;
} }
printf(passed ? "PASSED\n" : "FAILED\n"); printf(passed ? "PASSED\n" : "FAILED\n");
@ -393,7 +393,7 @@ void testBePlusTree() {
printf("Check that tree(2) contains test data: "); printf("Check that tree(2) contains test data: ");
for (i = 0; i < v.getCount(); i++) { for (i = 0; i < v.getCount(); i++) {
if(!tree1.locate(locEqual, v[i])) if (!tree1.locate(locEqual, v[i]))
passed = false; passed = false;
} }
printf(passed ? "PASSED\n" : "FAILED\n"); printf(passed ? "PASSED\n" : "FAILED\n");
@ -401,7 +401,7 @@ void testBePlusTree() {
printf("Check that tree(13) contains test data: "); printf("Check that tree(13) contains test data: ");
for (i = 0; i < v.getCount(); i++) { for (i = 0; i < v.getCount(); i++) {
if(!tree2.locate(locEqual, v[i])) if (!tree2.locate(locEqual, v[i]))
passed = false; passed = false;
} }
printf(passed ? "PASSED\n" : "FAILED\n"); printf(passed ? "PASSED\n" : "FAILED\n");

View File

@ -298,7 +298,7 @@ extern "C" {
#ifdef WIN_NT #ifdef WIN_NT
CharUpperBuffA(Modify(), length()); CharUpperBuffA(Modify(), length());
#else // WIN_NT #else // WIN_NT
for(pointer p = Modify(); *p; p++) { for (pointer p = Modify(); *p; p++) {
*p = toupper(*p); *p = toupper(*p);
} }
#endif // WIN_NT #endif // WIN_NT
@ -308,7 +308,7 @@ extern "C" {
#ifdef WIN_NT #ifdef WIN_NT
CharLowerBuffA(Modify(), length()); CharLowerBuffA(Modify(), length());
#else // WIN_NT #else // WIN_NT
for(pointer p = Modify(); *p; p++) { for (pointer p = Modify(); *p; p++) {
*p = tolower(*p); *p = tolower(*p);
} }
#endif // WIN_NT #endif // WIN_NT

View File

@ -24,7 +24,7 @@
* Contributor(s): ______________________________________. * Contributor(s): ______________________________________.
* *
* *
* $Id: sparse_bitmap.h,v 1.4 2004-10-01 06:27:57 hvlad Exp $ * $Id: sparse_bitmap.h,v 1.5 2004-10-04 08:14:44 robocop Exp $
* *
*/ */
@ -272,7 +272,7 @@ public:
} }
// Transform locLess and locGreat to locLessEqual and locGreatEqual // Transform locLess and locGreat to locLessEqual and locGreatEqual
switch(lt) { switch (lt) {
case locLess: case locLess:
if (key == 0) if (key == 0)
return false; return false;
@ -294,7 +294,7 @@ public:
return false; return false;
} }
switch(lt) { switch (lt) {
case locEqual: case locEqual:
current_value = key; current_value = key;
bit_mask = BUNCH_ONE << (key - key_aligned); bit_mask = BUNCH_ONE << (key - key_aligned);
@ -316,7 +316,7 @@ public:
return true; return true;
bit_mask <<= 1; bit_mask <<= 1;
current_value++; current_value++;
} while(bit_mask); } while (bit_mask);
// We scanned bucket, but found no match. // We scanned bucket, but found no match.
// No problem, scan the next bucket (there should be at least one bit set for a bucket) // No problem, scan the next bucket (there should be at least one bit set for a bucket)
@ -331,7 +331,7 @@ public:
return true; return true;
bit_mask <<= 1; bit_mask <<= 1;
current_value++; current_value++;
} while(bit_mask); } while (bit_mask);
// Bucket must contain one bit at least // Bucket must contain one bit at least
fb_assert(false); fb_assert(false);
@ -353,7 +353,7 @@ public:
return true; return true;
bit_mask >>= 1; bit_mask >>= 1;
current_value--; current_value--;
} while(bit_mask); } while (bit_mask);
// We scanned bucket, but found no match. // We scanned bucket, but found no match.
// No problem, scan the next bucket (there should be at least one bit set for a bucket) // No problem, scan the next bucket (there should be at least one bit set for a bucket)
@ -368,7 +368,7 @@ public:
return true; return true;
bit_mask >>= 1; bit_mask >>= 1;
current_value--; current_value--;
} while(bit_mask); } while (bit_mask);
// Bucket must contain one bit at least // Bucket must contain one bit at least
fb_assert(false); fb_assert(false);
@ -399,7 +399,7 @@ public:
return true; return true;
bit_mask <<= 1; bit_mask <<= 1;
current_value++; current_value++;
} while(bit_mask); } while (bit_mask);
// Bucket must contain one bit at least // Bucket must contain one bit at least
fb_assert(false); fb_assert(false);
@ -429,7 +429,7 @@ public:
return true; return true;
bit_mask >>= 1; bit_mask >>= 1;
current_value--; current_value--;
} while(bit_mask); } while (bit_mask);
// Bucket must contain one bit at least // Bucket must contain one bit at least
fb_assert(false); fb_assert(false);
@ -477,7 +477,7 @@ public:
} }
try_mask <<= 1; try_mask <<= 1;
try_value++; try_value++;
} while(try_mask); } while (try_mask);
// Bucket must contain one bit at least // Bucket must contain one bit at least
fb_assert(false); fb_assert(false);
@ -500,7 +500,7 @@ public:
// Scan bucket backwards looking for a match // Scan bucket backwards looking for a match
BUNCH_T tree_bits = treeAccessor.current().bits; BUNCH_T tree_bits = treeAccessor.current().bits;
while(try_mask) { while (try_mask) {
if (tree_bits & try_mask) { if (tree_bits & try_mask) {
bit_mask = try_mask; bit_mask = try_mask;
current_value = try_value; current_value = try_value;
@ -526,7 +526,7 @@ public:
} }
try_mask >>= 1; try_mask >>= 1;
try_value--; try_value--;
} while(bit_mask); } while (bit_mask);
// Bucket must contain one bit at least // Bucket must contain one bit at least
fb_assert(false); fb_assert(false);

View File

@ -192,7 +192,7 @@ bool DirectoryList::isPathInList(const PathName& path) const
fb_assert(mode != NotInitialized); fb_assert(mode != NotInitialized);
// Handle special cases // Handle special cases
switch(mode) { switch (mode) {
case None: case None:
return false; return false;
case Full: case Full:

View File

@ -53,7 +53,7 @@ status_exception::status_exception(const ISC_STATUS *status_vector) throw() :
if (type == isc_arg_cstring) if (type == isc_arg_cstring)
*ptr++ = *status_vector++; *ptr++ = *status_vector++;
*ptr++ = *status_vector++; *ptr++ = *status_vector++;
} while(true); } while (true);
} }
} }
@ -70,7 +70,7 @@ void status_exception::fill_status(ISC_STATUS status, va_list status_args)
if (type == isc_arg_end) if (type == isc_arg_end)
break; break;
switch(type) { switch (type) {
case isc_arg_cstring: case isc_arg_cstring:
{ {
const UCHAR len = *ptr++ = va_arg(status_args, ISC_STATUS); const UCHAR len = *ptr++ = va_arg(status_args, ISC_STATUS);
@ -121,7 +121,7 @@ status_exception::~status_exception() throw() {
if (type == isc_arg_end) if (type == isc_arg_end)
break; break;
switch(type) { switch (type) {
case isc_arg_cstring: case isc_arg_cstring:
ptr++; ptr++;
delete[] reinterpret_cast<char*>(*ptr++); delete[] reinterpret_cast<char*>(*ptr++);
@ -134,7 +134,7 @@ status_exception::~status_exception() throw() {
ptr++; ptr++;
break; break;
} }
} while(true); } while (true);
} }
void status_exception::raise() void status_exception::raise()
@ -225,7 +225,7 @@ ISC_STATUS stuff_exception(ISC_STATUS *status_vector, const std::exception& ex,
if (type == isc_arg_cstring) if (type == isc_arg_cstring)
*status_vector++ = *ptr++; *status_vector++ = *ptr++;
*status_vector++ = *ptr++; *status_vector++ = *ptr++;
} while(true); } while (true);
} }
else { else {
// Move in status and clone transient strings // Move in status and clone transient strings
@ -234,7 +234,7 @@ ISC_STATUS stuff_exception(ISC_STATUS *status_vector, const std::exception& ex,
if (type == isc_arg_end) if (type == isc_arg_end)
break; break;
switch(type) { switch (type) {
case isc_arg_cstring: case isc_arg_cstring:
{ {
const UCHAR len = *status_vector++ = *ptr++; const UCHAR len = *status_vector++ = *ptr++;

View File

@ -271,7 +271,7 @@ ISC_STATUS API_ROUTINE isc_array_set_desc(ISC_STATUS* status,
const SSHORT dtype = *sql_dtype & ~1; const SSHORT dtype = *sql_dtype & ~1;
switch(dtype) { switch (dtype) {
case SQL_VARYING: case SQL_VARYING:
desc->array_desc_dtype = blr_varying; desc->array_desc_dtype = blr_varying;
break; break;

View File

@ -20,7 +20,7 @@
* All Rights Reserved. * All Rights Reserved.
* Contributor(s): ______________________________________. * Contributor(s): ______________________________________.
* *
* $Id: ddl.cpp,v 1.115 2004-10-03 04:48:37 robocop Exp $ * $Id: ddl.cpp,v 1.116 2004-10-04 08:14:49 robocop Exp $
* 2001.5.20 Claudio Valderrama: Stop null pointer that leads to a crash, * 2001.5.20 Claudio Valderrama: Stop null pointer that leads to a crash,
* caused by incomplete yacc syntax that allows ALTER DOMAIN dom SET; * caused by incomplete yacc syntax that allows ALTER DOMAIN dom SET;
* *
@ -2014,7 +2014,7 @@ static SSHORT getBlobFilterSubType(dsql_req* request, const dsql_nod* node)
* *
**************************************/ **************************************/
fb_assert(node->nod_type == nod_constant); fb_assert(node->nod_type == nod_constant);
switch(node->nod_desc.dsc_dtype) switch (node->nod_desc.dsc_dtype)
{ {
case dtype_long: case dtype_long:
return (SSHORT)(IPTR)node->nod_arg[0]; return (SSHORT)(IPTR)node->nod_arg[0];
@ -2679,7 +2679,7 @@ static void define_rel_constraint( dsql_req* request, dsql_nod* element)
dsql_nod* node = element->nod_arg[e_rct_type]; dsql_nod* node = element->nod_arg[e_rct_type];
switch(node->nod_type) { switch (node->nod_type) {
case nod_unique: case nod_unique:
case nod_primary: case nod_primary:
make_index(request, node, node->nod_arg[0], 0, 0, constraint_name); make_index(request, node, node->nod_arg[0], 0, 0, constraint_name);

View File

@ -2266,7 +2266,7 @@ static void gen_select( dsql_req* request, dsql_nod* rse)
MAKE_desc(&parameter->par_desc, item, NULL); MAKE_desc(&parameter->par_desc, item, NULL);
const char* name_alias = NULL; const char* name_alias = NULL;
switch(item->nod_type) { switch (item->nod_type) {
case nod_field: { case nod_field: {
field = (dsql_fld*) item->nod_arg[e_fld_field]; field = (dsql_fld*) item->nod_arg[e_fld_field];
name_alias = field->fld_name; name_alias = field->fld_name;
@ -2352,7 +2352,7 @@ static void gen_select( dsql_req* request, dsql_nod* rse)
map = (dsql_map*) map_node->nod_arg[e_map_map]; map = (dsql_map*) map_node->nod_arg[e_map_map];
map_node = map->map_node; map_node = map->map_node;
} }
switch(map_node->nod_type) { switch (map_node->nod_type) {
case nod_field: { case nod_field: {
field = (dsql_fld*) map_node->nod_arg[e_fld_field]; field = (dsql_fld*) map_node->nod_arg[e_fld_field];
name_alias = field->fld_name; name_alias = field->fld_name;

View File

@ -91,7 +91,7 @@ void HSHD_init(void)
UCHAR* p = (UCHAR *) gds__alloc(sizeof(DSQL_SYM) * HASH_SIZE); UCHAR* p = (UCHAR *) gds__alloc(sizeof(DSQL_SYM) * HASH_SIZE);
// This is appropriate to throw exception here, callers check for it // This is appropriate to throw exception here, callers check for it
if(!p) if (!p)
throw std::bad_alloc(); throw std::bad_alloc();
memset(p, 0, sizeof(DSQL_SYM) * HASH_SIZE); memset(p, 0, sizeof(DSQL_SYM) * HASH_SIZE);

View File

@ -6283,7 +6283,7 @@ int LexerState::yylex (
int nextToken = yylex(client_dialect, db_dialect, parser_version, stmt_ambiguous); int nextToken = yylex(client_dialect, db_dialect, parser_version, stmt_ambiguous);
lex = savedState; lex = savedState;
if (nextToken == OR || nextToken == AND) { if (nextToken == OR || nextToken == AND) {
switch(sym->sym_keyword) { switch (sym->sym_keyword) {
case INSERTING: case INSERTING:
yylval = (dsql_nod*) sym->sym_object; yylval = (dsql_nod*) sym->sym_object;
return KW_INSERTING; return KW_INSERTING;
@ -6405,7 +6405,7 @@ int LexerState::yylex (
int token = yylex(client_dialect, db_dialect, parser_version, stmt_ambiguous); int token = yylex(client_dialect, db_dialect, parser_version, stmt_ambiguous);
lex = savedState; lex = savedState;
if (token == OR || token == AND) { if (token == OR || token == AND) {
switch(nextToken) { switch (nextToken) {
case INSERTING: case INSERTING:
return KW_INSERTING; return KW_INSERTING;
case UPDATING: case UPDATING:

View File

@ -5088,7 +5088,7 @@ int LexerState::yylex (
int nextToken = yylex(client_dialect, db_dialect, parser_version, stmt_ambiguous); int nextToken = yylex(client_dialect, db_dialect, parser_version, stmt_ambiguous);
lex = savedState; lex = savedState;
if (nextToken == OR || nextToken == AND) { if (nextToken == OR || nextToken == AND) {
switch(sym->sym_keyword) { switch (sym->sym_keyword) {
case INSERTING: case INSERTING:
yylval = (dsql_nod*) sym->sym_object; yylval = (dsql_nod*) sym->sym_object;
return KW_INSERTING; return KW_INSERTING;
@ -5210,7 +5210,7 @@ int LexerState::yylex (
int token = yylex(client_dialect, db_dialect, parser_version, stmt_ambiguous); int token = yylex(client_dialect, db_dialect, parser_version, stmt_ambiguous);
lex = savedState; lex = savedState;
if (token == OR || token == AND) { if (token == OR || token == AND) {
switch(nextToken) { switch (nextToken) {
case INSERTING: case INSERTING:
return KW_INSERTING; return KW_INSERTING;
case UPDATING: case UPDATING:

View File

@ -2055,7 +2055,7 @@ static void check_unique_fields_names(StrArray& names, const dsql_nod* fields)
const char* name = NULL; const char* name = NULL;
for (; ptr < end; ptr++) { for (; ptr < end; ptr++) {
switch((*ptr)->nod_type) { switch ((*ptr)->nod_type) {
case nod_def_field: case nod_def_field:
field = (dsql_fld*) (*ptr)->nod_arg[e_dfl_field]; field = (dsql_fld*) (*ptr)->nod_arg[e_dfl_field];
DEV_BLKCHK(field, dsql_type_fld); DEV_BLKCHK(field, dsql_type_fld);

View File

@ -276,7 +276,7 @@ static void build_external_access(thread_db* tdbb, ExternalAccessList& list, jrd
if (!relation) continue; if (!relation) continue;
trig_vec *vec1, *vec2; trig_vec *vec1, *vec2;
switch(item->exa_action) { switch (item->exa_action) {
case ExternalAccess::exa_insert: case ExternalAccess::exa_insert:
vec1 = relation->rel_pre_store; vec1 = relation->rel_pre_store;
vec2 = relation->rel_post_store; vec2 = relation->rel_post_store;
@ -398,7 +398,7 @@ void CMP_verify_access(thread_db* tdbb, jrd_req* request)
if (!relation) continue; if (!relation) continue;
switch(item->exa_action) { switch (item->exa_action) {
case ExternalAccess::exa_insert: case ExternalAccess::exa_insert:
verify_trigger_access(tdbb, relation, relation->rel_pre_store, view); verify_trigger_access(tdbb, relation, relation->rel_pre_store, view);
verify_trigger_access(tdbb, relation, relation->rel_post_store, view); verify_trigger_access(tdbb, relation, relation->rel_post_store, view);

View File

@ -1757,7 +1757,7 @@ static void stuff_stack_trace(const jrd_req* request)
Firebird::string sTrace; Firebird::string sTrace;
bool isEmpty = true; bool isEmpty = true;
for(const jrd_req* req = request; req; req = req->req_caller) for (const jrd_req* req = request; req; req = req->req_caller)
{ {
Firebird::string name; Firebird::string name;
@ -1774,7 +1774,7 @@ static void stuff_stack_trace(const jrd_req* request)
{ {
name.trim(); name.trim();
if(sTrace.length() + name.length() > MAX_STACK_TRACE) if (sTrace.length() + name.length() > MAX_STACK_TRACE)
break; break;
if (isEmpty) { if (isEmpty) {
@ -3257,7 +3257,7 @@ static void release_blobs(thread_db* tdbb, jrd_req* request)
} }
if (!request->req_blobs.getNext()) if (!request->req_blobs.getNext())
break; break;
} while(true); } while (true);
request->req_blobs.clear(); request->req_blobs.clear();

View File

@ -153,7 +153,7 @@ bool SHUT_database(Database* dbb, SSHORT flag, SSHORT delay)
// This is required to ensure backward compatible behavior (gbak relies on that, // This is required to ensure backward compatible behavior (gbak relies on that,
// user-written scripts may rely on this behaviour too) // user-written scripts may rely on this behaviour too)
int shut_mode = flag & isc_dpb_shut_mode_mask; int shut_mode = flag & isc_dpb_shut_mode_mask;
switch(shut_mode) { switch (shut_mode) {
case isc_dpb_shut_full: case isc_dpb_shut_full:
if (dbb->dbb_ast_flags & DBB_shutdown_full) if (dbb->dbb_ast_flags & DBB_shutdown_full)
return bad_mode(IGNORE_SAME_MODE); return bad_mode(IGNORE_SAME_MODE);
@ -250,7 +250,7 @@ bool SHUT_database(Database* dbb, SSHORT flag, SSHORT delay)
CCH_MARK_MUST_WRITE(tdbb, &window); CCH_MARK_MUST_WRITE(tdbb, &window);
// Set appropriate shutdown mode in database header // Set appropriate shutdown mode in database header
header->hdr_flags &= ~Ods::hdr_shutdown_mask; header->hdr_flags &= ~Ods::hdr_shutdown_mask;
switch(flag & isc_dpb_shut_mode_mask) { switch (flag & isc_dpb_shut_mode_mask) {
case isc_dpb_shut_normal: case isc_dpb_shut_normal:
break; break;
case isc_dpb_shut_multi: case isc_dpb_shut_multi:
@ -319,7 +319,7 @@ bool SHUT_online(Database* dbb, SSHORT flag)
// Check if requested shutdown mode is valid // Check if requested shutdown mode is valid
int shut_mode = flag & isc_dpb_shut_mode_mask; int shut_mode = flag & isc_dpb_shut_mode_mask;
switch(shut_mode) { switch (shut_mode) {
case isc_dpb_shut_normal: case isc_dpb_shut_normal:
if (!(dbb->dbb_ast_flags & DBB_shutdown)) if (!(dbb->dbb_ast_flags & DBB_shutdown))
return bad_mode(IGNORE_SAME_MODE); // normal -> normal return bad_mode(IGNORE_SAME_MODE); // normal -> normal
@ -359,7 +359,7 @@ bool SHUT_online(Database* dbb, SSHORT flag)
CCH_MARK_MUST_WRITE(tdbb, &window); CCH_MARK_MUST_WRITE(tdbb, &window);
// Set appropriate shutdown mode in database header // Set appropriate shutdown mode in database header
header->hdr_flags &= ~Ods::hdr_shutdown_mask; header->hdr_flags &= ~Ods::hdr_shutdown_mask;
switch(shut_mode) { switch (shut_mode) {
case isc_dpb_shut_normal: case isc_dpb_shut_normal:
break; break;
case isc_dpb_shut_multi: case isc_dpb_shut_multi:

View File

@ -19,7 +19,7 @@
* *
* All Rights Reserved. * All Rights Reserved.
* Contributor(s): ______________________________________. * Contributor(s): ______________________________________.
* $Id: sort.cpp,v 1.68 2004-05-17 22:27:56 brodsom Exp $ * $Id: sort.cpp,v 1.69 2004-10-04 08:14:57 robocop Exp $
* *
* 2001-09-24 SJL - Temporary fix for large sort file bug * 2001-09-24 SJL - Temporary fix for large sort file bug
* *
@ -1066,7 +1066,7 @@ bool SORT_sort(ISC_STATUS * status_vector, sort_context* scb)
(merge_control*) gds__alloc((SLONG) (count - 1) * sizeof(merge_control)); (merge_control*) gds__alloc((SLONG) (count - 1) * sizeof(merge_control));
// FREE: smb_merge_pool freed in local_fini() when the scb is released // FREE: smb_merge_pool freed in local_fini() when the scb is released
merge_pool = scb->scb_merge_pool; merge_pool = scb->scb_merge_pool;
if(!merge_pool) { if (!merge_pool) {
gds__free(streams); gds__free(streams);
*status_vector++ = isc_arg_gds; *status_vector++ = isc_arg_gds;
*status_vector++ = isc_sort_mem_err; *status_vector++ = isc_sort_mem_err;

View File

@ -252,7 +252,7 @@ int THD_wlck_lock(WLCK_T* wlock, WLCK_type type)
* *
**************************************/ **************************************/
switch(type) switch (type)
{ {
case WLCK_read: case WLCK_read:
#ifdef DEBUG_THREAD #ifdef DEBUG_THREAD
@ -296,7 +296,7 @@ int THD_wlck_unlock(WLCK_T* wlock)
fprintf(stderr, "calling rwlock_unlock %x\n", wlock); fprintf(stderr, "calling rwlock_unlock %x\n", wlock);
#endif #endif
switch(wlock->type) switch (wlock->type)
{ {
case WLCK_read: case WLCK_read:
wlock->rwLock.endRead(); wlock->rwLock.endRead();

View File

@ -1014,7 +1014,7 @@ void TRA_release_transaction(thread_db* tdbb, jrd_tra* transaction)
if (!transaction->tra_blobs.locate(Firebird::locGreat, temp_id)) if (!transaction->tra_blobs.locate(Firebird::locGreat, temp_id))
break; break;
} }
} while(true); } while (true);
while (transaction->tra_arrays) while (transaction->tra_arrays)
BLB_release_array(transaction->tra_arrays); BLB_release_array(transaction->tra_arrays);

View File

@ -1644,7 +1644,7 @@ static RTN walk_index(thread_db* tdbb,
return corrupt(tdbb, control, VAL_INDEX_MISSING_ROWS, return corrupt(tdbb, control, VAL_INDEX_MISSING_ROWS,
relation, id + 1); relation, id + 1);
} }
} while(accessor.getNext()); } while (accessor.getNext());
THREAD_ENTER(); THREAD_ENTER();
} }

View File

@ -42,7 +42,7 @@
* *
*/ */
/* /*
$Id: why.cpp,v 1.80 2004-09-26 07:45:19 robocop Exp $ $Id: why.cpp,v 1.81 2004-10-04 08:14:57 robocop Exp $
*/ */
#include "firebird.h" #include "firebird.h"
@ -254,7 +254,7 @@ why_hndl* WHY_alloc_handle(int implementation, int handle_type)
if (!temp) if (!temp)
temp = ++handle_sequence_number; temp = ++handle_sequence_number;
handle->public_handle = reinterpret_cast<FB_API_HANDLE>(temp); handle->public_handle = reinterpret_cast<FB_API_HANDLE>(temp);
} while(!handleMapping->add(handle)); } while (!handleMapping->add(handle));
handleMappingLock.endWrite(); handleMappingLock.endWrite();
} catch(const std::exception&) { } catch(const std::exception&) {

View File

@ -24,7 +24,7 @@
* Contributor(s): ______________________________________. * Contributor(s): ______________________________________.
* *
* *
* $Id: nbackup.cpp,v 1.33 2004-09-25 10:28:03 robocop Exp $ * $Id: nbackup.cpp,v 1.34 2004-10-04 08:15:00 robocop Exp $
* *
*/ */
@ -618,7 +618,7 @@ void nbackup::backup_database(int level, const char* fname)
bool guid_found = false; bool guid_found = false;
const UCHAR* p = reinterpret_cast<Ods::header_page*>(page_buff)->hdr_data; const UCHAR* p = reinterpret_cast<Ods::header_page*>(page_buff)->hdr_data;
while (true) { while (true) {
switch(*p) { switch (*p) {
case Ods::HDR_backup_guid: case Ods::HDR_backup_guid:
if (p[1] != sizeof(FB_GUID)) if (p[1] != sizeof(FB_GUID))
break; break;
@ -869,7 +869,7 @@ void nbackup::restore_database(int filecount, const char* const* files)
bool guid_found = false; bool guid_found = false;
const UCHAR* p = reinterpret_cast<Ods::header_page*>(page_buffer)->hdr_data; const UCHAR* p = reinterpret_cast<Ods::header_page*>(page_buffer)->hdr_data;
while (true) { while (true) {
switch(*p) { switch (*p) {
case Ods::HDR_backup_guid: case Ods::HDR_backup_guid:
if (p[1] != sizeof(FB_GUID)) if (p[1] != sizeof(FB_GUID))
break; break;