From 244ac97e80c6fdf6fc7b594614a84ee6fd962c6f Mon Sep 17 00:00:00 2001 From: asfernandes Date: Mon, 21 Jul 2008 02:20:41 +0000 Subject: [PATCH] Misc --- src/common/cvt.cpp | 7 ------- src/dudley/expand.cpp | 9 ++++----- src/dudley/hsh.cpp | 2 ++ src/jrd/fun.epp | 2 +- src/jrd/idx.cpp | 2 +- 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/common/cvt.cpp b/src/common/cvt.cpp index d3f5feac2f..674cf2e3d7 100644 --- a/src/common/cvt.cpp +++ b/src/common/cvt.cpp @@ -1237,13 +1237,6 @@ void CVT_move_common(const dsc* from, dsc* to, Callbacks* cb) UCHAR* p = to->dsc_address; const UCHAR* q = from->dsc_address; -#ifdef DEV_BUILD - // To be activated by the debugger. - static int t = 0; - if (t) - CVT_conversion_error(from, cb->err); -#endif - /* If the datatypes and lengths are identical, just move the stuff byte by byte. Although this may seem slower than optimal, it would cost more to find the fast move than the diff --git a/src/dudley/expand.cpp b/src/dudley/expand.cpp index fe66101467..6f3034f650 100644 --- a/src/dudley/expand.cpp +++ b/src/dudley/expand.cpp @@ -609,7 +609,7 @@ static DUDLEY_FLD lookup_global_field( DUDLEY_FLD field) /* Find symbol */ name = (field->fld_source) ? field->fld_source : field->fld_name; - if (symbol = HSH_typed_lookup(name->sym_string, name->sym_length, SYM_global)) + if ((symbol = HSH_typed_lookup(name->sym_string, name->sym_length, SYM_global))) return (DUDLEY_FLD) symbol->sym_object; expand_error(103, SafeArg() << name->sym_string); /* msg 103: global field %s isn't defined */ @@ -634,9 +634,8 @@ static DUDLEY_REL lookup_relation( DUDLEY_REL relation) /* Find symbol */ name = (relation->rel_name); - if ( - (symbol = HSH_typed_lookup(name->sym_string, name->sym_length, SYM_relation)) - && symbol->sym_object) + if ((symbol = HSH_typed_lookup(name->sym_string, name->sym_length, SYM_relation)) && + symbol->sym_object) { return (DUDLEY_REL) symbol->sym_object; } @@ -663,7 +662,7 @@ static DUDLEY_TRG lookup_trigger( DUDLEY_TRG trigger) /* Find symbol */ name = (trigger->trg_name); - if (symbol = HSH_typed_lookup(name->sym_string, name->sym_length, SYM_trigger)) + if ((symbol = HSH_typed_lookup(name->sym_string, name->sym_length, SYM_trigger))) return (DUDLEY_TRG) symbol->sym_object; expand_error(105, SafeArg() << name->sym_string); /* msg 105: trigger %s isn't defined */ diff --git a/src/dudley/hsh.cpp b/src/dudley/hsh.cpp index 78e5d723ca..ee33de397f 100644 --- a/src/dudley/hsh.cpp +++ b/src/dudley/hsh.cpp @@ -303,6 +303,7 @@ void HSH_insert( SYM symbol) const USHORT h = hash(symbol->sym_string, symbol->sym_length); for (SYM old = hash_table[h]; old; old = old->sym_collision) + { if (scompare(symbol->sym_string, symbol->sym_length, old->sym_string, old->sym_length)) { @@ -310,6 +311,7 @@ void HSH_insert( SYM symbol) old->sym_homonym = symbol; return; } + } symbol->sym_collision = hash_table[h]; hash_table[h] = symbol; diff --git a/src/jrd/fun.epp b/src/jrd/fun.epp index 0b9ab8867a..8039d89ba4 100644 --- a/src/jrd/fun.epp +++ b/src/jrd/fun.epp @@ -1053,7 +1053,7 @@ static void invoke(thread_db* tdbb, **************************************/ SET_TDBB(tdbb); Database* dbb = tdbb->getDatabase(); - + START_CHECK_FOR_EXCEPTIONS(function->fun_exception_message.c_str()); if (function->fun_return_arg) { diff --git a/src/jrd/idx.cpp b/src/jrd/idx.cpp index 4d14b8f74e..199fd5b6e2 100644 --- a/src/jrd/idx.cpp +++ b/src/jrd/idx.cpp @@ -1368,7 +1368,7 @@ static IDX_E check_partner_index( // unique index, because a comparison is done on both keys. index_desc tmpIndex = *idx; // ASF: Was incorrect to verify broken foreign keys. - // Should not use a unique key to search a non-unique index. + // Should not use an unique key to search a non-unique index. // tmpIndex.idx_flags |= idx_unique; tmpIndex.idx_flags = (tmpIndex.idx_flags & ~idx_unique) | (partner_idx.idx_flags & idx_unique); temporary_key key;