mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 22:03:03 +01:00
Misc
This commit is contained in:
parent
99fe0e46c8
commit
91a4550d23
@ -4029,7 +4029,7 @@ bool get_global_field(BurpGlobals* tdgbl)
|
||||
!X.RDB$CHARACTER_SET_ID.NULL && X.RDB$CHARACTER_SET_ID == CS_UNICODE_FSS &&
|
||||
((!X.RDB$CHARACTER_LENGTH.NULL &&
|
||||
(X.RDB$FIELD_TYPE == blr_text || X.RDB$FIELD_TYPE == blr_varying)) ||
|
||||
X.RDB$FIELD_TYPE == blr_blob))
|
||||
X.RDB$FIELD_TYPE == blr_blob))
|
||||
{
|
||||
if (X.RDB$FIELD_TYPE != blr_blob)
|
||||
X.RDB$CHARACTER_LENGTH = X.RDB$FIELD_LENGTH;
|
||||
@ -4368,7 +4368,7 @@ bool get_global_field(BurpGlobals* tdgbl)
|
||||
!X.RDB$CHARACTER_SET_ID.NULL && X.RDB$CHARACTER_SET_ID == CS_UNICODE_FSS &&
|
||||
((!X.RDB$CHARACTER_LENGTH.NULL &&
|
||||
(X.RDB$FIELD_TYPE == blr_text || X.RDB$FIELD_TYPE == blr_varying)) ||
|
||||
X.RDB$FIELD_TYPE == blr_blob))
|
||||
X.RDB$FIELD_TYPE == blr_blob))
|
||||
{
|
||||
if (X.RDB$FIELD_TYPE != blr_blob)
|
||||
X.RDB$CHARACTER_LENGTH = X.RDB$FIELD_LENGTH;
|
||||
|
@ -195,7 +195,7 @@ int main( int argc, char *argv[])
|
||||
argv++;
|
||||
ret_cd = get_function_option(prog_name, &sw_replace, string, spit_in_sw_table);
|
||||
if (ret_cd == FB_FAILURE) {
|
||||
ret_cd = free_file_list(file_list);
|
||||
free_file_list(file_list);
|
||||
return FB_FAILURE;
|
||||
}
|
||||
} // end of processing (*string == '-')
|
||||
@ -228,7 +228,7 @@ int main( int argc, char *argv[])
|
||||
ret_cd = get_file_name(string, file_size, &file_ptr);
|
||||
|
||||
if (ret_cd == FB_FAILURE) {
|
||||
ret_cd = free_file_list(file_list);
|
||||
free_file_list(file_list);
|
||||
return FB_FAILURE;
|
||||
}
|
||||
|
||||
@ -248,7 +248,7 @@ int main( int argc, char *argv[])
|
||||
file_nm_sw = false;
|
||||
ret_cd = get_file_size(prog_name, string, &file_size);
|
||||
if (ret_cd == FB_FAILURE) {
|
||||
ret_cd = free_file_list(file_list);
|
||||
free_file_list(file_list);
|
||||
return FB_FAILURE;
|
||||
}
|
||||
} // end of processing file size specification
|
||||
@ -259,7 +259,7 @@ int main( int argc, char *argv[])
|
||||
ret_cd = get_file_name(string, file_size, &file_ptr);
|
||||
|
||||
if (ret_cd == FB_FAILURE) {
|
||||
ret_cd = free_file_list(file_list);
|
||||
free_file_list(file_list);
|
||||
return FB_FAILURE;
|
||||
}
|
||||
|
||||
@ -276,8 +276,8 @@ int main( int argc, char *argv[])
|
||||
|
||||
default:
|
||||
fprintf(stderr, "%s: invalid option '%s'\n", prog_name, string);
|
||||
ret_cd = print_clo(prog_name);
|
||||
ret_cd = free_file_list(file_list);
|
||||
print_clo(prog_name);
|
||||
free_file_list(file_list);
|
||||
return FB_FAILURE;
|
||||
} // end of switch (sw_replace)
|
||||
|
||||
@ -287,8 +287,8 @@ int main( int argc, char *argv[])
|
||||
|
||||
if (!file_list && sw_replace != IN_SW_SPIT_0) {
|
||||
fprintf(stderr, "%s: invalid option '%s', rest of parameters is missing\n", prog_name, string);
|
||||
ret_cd = print_clo(prog_name);
|
||||
ret_cd = free_file_list(file_list);
|
||||
print_clo(prog_name);
|
||||
free_file_list(file_list);
|
||||
return FB_FAILURE;
|
||||
}
|
||||
|
||||
@ -300,7 +300,7 @@ int main( int argc, char *argv[])
|
||||
ret_cd = gen_multy_bakup_files(file_list, input_file_desc, file_num);
|
||||
if (ret_cd == FB_FAILURE) {
|
||||
fprintf(stderr, "%s: progam fails to generate multi-volumn back-up files\n", prog_name);
|
||||
ret_cd = free_file_list(file_list);
|
||||
free_file_list(file_list);
|
||||
return FB_FAILURE;
|
||||
}
|
||||
break;
|
||||
@ -309,7 +309,7 @@ int main( int argc, char *argv[])
|
||||
ret_cd = join_multy_bakup_files(file_list);
|
||||
if (ret_cd == FB_FAILURE) {
|
||||
fprintf(stderr, "%s: progam fails to join multi-volumn back-up files\n", prog_name);
|
||||
ret_cd = free_file_list(file_list);
|
||||
free_file_list(file_list);
|
||||
return FB_FAILURE;
|
||||
}
|
||||
break;
|
||||
@ -325,7 +325,7 @@ int main( int argc, char *argv[])
|
||||
*********************************************************
|
||||
*/
|
||||
|
||||
ret_cd = free_file_list(file_list);
|
||||
free_file_list(file_list);
|
||||
return FB_SUCCESS;
|
||||
|
||||
} // end of main()
|
||||
@ -1340,4 +1340,3 @@ static int free_file_list( b_fil* file_list)
|
||||
|
||||
return FB_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -277,10 +277,10 @@ int MsgPrint(BaseStream& out_stream, const char* format, const SafeArg& arg)
|
||||
out_bytes += out_stream.write("\\(EOF)", 6);
|
||||
return out_bytes;
|
||||
case 'n':
|
||||
out_bytes += out_stream.write("\n", sizeof('\n'));
|
||||
out_bytes += out_stream.write("\n", 1);
|
||||
break;
|
||||
case 't':
|
||||
out_bytes += out_stream.write("\t", sizeof('\t'));
|
||||
out_bytes += out_stream.write("\t", 1);
|
||||
break;
|
||||
default:
|
||||
out_bytes += out_stream.write(iter, 2); // iter[0] and iter[1]
|
||||
|
@ -230,10 +230,10 @@ void ConfigFile::loadConfig()
|
||||
#ifdef EXCEPTION_ON_NO_CONF
|
||||
if (fExceptionOnError)
|
||||
{
|
||||
const Firebird::string Msg =
|
||||
const Firebird::string msg =
|
||||
"Missing configuration file: " + configFile.ToString() + ", exiting";
|
||||
Firebird::Syslog::Record(Firebird::Syslog::Error, Msg.c_str());
|
||||
Firebird::fatal_exception::raise(Msg.c_str());
|
||||
Firebird::Syslog::Record(Firebird::Syslog::Error, msg.c_str());
|
||||
Firebird::fatal_exception::raise(msg.c_str());
|
||||
}
|
||||
#endif //EXCEPTION_ON_NO_CONF
|
||||
return;
|
||||
@ -254,11 +254,11 @@ void ConfigFile::loadConfig()
|
||||
|
||||
if (!goodLine || inputLine.find('=') == string::npos)
|
||||
{
|
||||
const Firebird::string Msg =
|
||||
const Firebird::string msg =
|
||||
(configFile + ": illegal line \"" + inputLine + "\"").ToString();
|
||||
Firebird::Syslog::Record(fExceptionOnError ?
|
||||
Firebird::Syslog::Error : Firebird::Syslog::Warning,
|
||||
Msg.c_str());
|
||||
msg.c_str());
|
||||
#ifdef EXCEPTION_ON_NO_CONF
|
||||
BadLinesCount++;
|
||||
#endif
|
||||
|
@ -2288,19 +2288,19 @@ SINT64 CVT_get_int64(const dsc* desc, SSHORT scale, ErrorFunction err)
|
||||
|
||||
switch (desc->dsc_dtype) {
|
||||
case dtype_short:
|
||||
value = *((SSHORT *) p);
|
||||
value = *((SSHORT*) p);
|
||||
break;
|
||||
|
||||
case dtype_long:
|
||||
value = *((SLONG *) p);
|
||||
value = *((SLONG*) p);
|
||||
break;
|
||||
|
||||
case dtype_int64:
|
||||
value = *((SINT64 *) p);
|
||||
value = *((SINT64*) p);
|
||||
break;
|
||||
|
||||
case dtype_quad:
|
||||
value = (((SINT64) ((SLONG *) p)[HIGH_WORD]) << 32) + (((ULONG *) p)[LOW_WORD]);
|
||||
value = (((SINT64) ((SLONG*) p)[HIGH_WORD]) << 32) + (((ULONG*) p)[LOW_WORD]);
|
||||
break;
|
||||
|
||||
case dtype_real:
|
||||
|
@ -3494,9 +3494,12 @@ static void define_update_action(CompiledStatement* statement,
|
||||
}
|
||||
|
||||
if (and_arg <= 1)
|
||||
{
|
||||
and_node->nod_arg[and_arg] =
|
||||
replace_field_names(select_expr->nod_arg[e_qry_where], items, NULL, false, TEMP_CONTEXT);
|
||||
else {
|
||||
}
|
||||
else
|
||||
{
|
||||
dsql_nod* old_and = and_node;
|
||||
and_node = MAKE_node(nod_and, (int) 2);
|
||||
and_node->nod_arg[0] = old_and;
|
||||
|
@ -577,7 +577,8 @@ class PsqlChanger
|
||||
{
|
||||
public:
|
||||
PsqlChanger(CompiledStatement* aStatement, bool value)
|
||||
: statement(aStatement), oldValue(statement->isPsql())
|
||||
: statement(aStatement),
|
||||
oldValue(statement->isPsql())
|
||||
{
|
||||
statement->setPsql(value);
|
||||
}
|
||||
|
@ -9438,14 +9438,14 @@ static dsql_nod* pass1_update_or_insert(CompiledStatement* statement, dsql_nod*
|
||||
fb_assert((*matching_ptr)->nod_type == nod_field_name);
|
||||
|
||||
const Firebird::MetaName
|
||||
testfield(((dsql_str*)(*matching_ptr)->nod_arg[e_fln_name])->str_data);
|
||||
testField(((dsql_str*)(*matching_ptr)->nod_arg[e_fln_name])->str_data);
|
||||
|
||||
if (testfield == field_name)
|
||||
if (testField == field_name)
|
||||
{
|
||||
++match_count;
|
||||
|
||||
const size_t fieldpos = field_ptr - fields->nod_arg;
|
||||
dsql_nod*& expr = insert->nod_arg[e_sto_statement]->nod_arg[fieldpos]->nod_arg[0];
|
||||
const size_t fieldPos = field_ptr - fields->nod_arg;
|
||||
dsql_nod*& expr = insert->nod_arg[e_sto_statement]->nod_arg[fieldPos]->nod_arg[0];
|
||||
dsql_nod* var = pass1_hidden_variable(statement, expr);
|
||||
|
||||
if (var)
|
||||
@ -9644,9 +9644,8 @@ static dsql_nod* pass1_variable( CompiledStatement* statement, dsql_nod* input)
|
||||
dsql_nod* var_node = *ptr;
|
||||
const dsql_var* variable = (dsql_var*) var_node->nod_arg[e_var_variable];
|
||||
DEV_BLKCHK(variable, dsql_type_var);
|
||||
if (!strcmp
|
||||
(reinterpret_cast<const char*>(var_name->str_data),
|
||||
variable->var_name))
|
||||
if (!strcmp(reinterpret_cast<const char*>(var_name->str_data),
|
||||
variable->var_name))
|
||||
{
|
||||
return var_node;
|
||||
}
|
||||
@ -9662,9 +9661,8 @@ static dsql_nod* pass1_variable( CompiledStatement* statement, dsql_nod* input)
|
||||
dsql_nod* var_node = *ptr;
|
||||
const dsql_var* variable = (dsql_var*) var_node->nod_arg[e_var_variable];
|
||||
DEV_BLKCHK(variable, dsql_type_var);
|
||||
if (!strcmp
|
||||
(reinterpret_cast<const char*>(var_name->str_data),
|
||||
variable->var_name))
|
||||
if (!strcmp(reinterpret_cast<const char*>(var_name->str_data),
|
||||
variable->var_name))
|
||||
{
|
||||
return var_node;
|
||||
}
|
||||
@ -9687,9 +9685,8 @@ static dsql_nod* pass1_variable( CompiledStatement* statement, dsql_nod* input)
|
||||
{
|
||||
const dsql_var* variable = (dsql_var*) var_node->nod_arg[e_var_variable];
|
||||
DEV_BLKCHK(variable, dsql_type_var);
|
||||
if (!strcmp
|
||||
(reinterpret_cast<const char*>(var_name->str_data),
|
||||
variable->var_name))
|
||||
if (!strcmp(reinterpret_cast<const char*>(var_name->str_data),
|
||||
variable->var_name))
|
||||
{
|
||||
return var_node;
|
||||
}
|
||||
|
@ -141,9 +141,9 @@ namespace
|
||||
}
|
||||
|
||||
ISC_STATUS_ARRAY local_status;
|
||||
#ifdef SOLARIS_MT
|
||||
#ifdef SOLARIS_MT
|
||||
ISC_unmap_object(local_status, &EVENT_data, (UCHAR**) &EVENT_process, sizeof(prb));
|
||||
#endif
|
||||
#endif
|
||||
ISC_unmap_file(local_status, &EVENT_data);
|
||||
|
||||
EVENT_header = NULL;
|
||||
|
@ -209,7 +209,7 @@ USHORT CLIENT_install(const TEXT * rootdir, USHORT client, bool sw_force,
|
||||
if (kernel32 != 0)
|
||||
{
|
||||
typedef BOOL __stdcall proto_ntmove(LPCSTR, LPCSTR, DWORD);
|
||||
proto_ntmove* ntmove = (proto_ntmove*)GetProcAddress(kernel32, "MoveFileExA");
|
||||
proto_ntmove* ntmove = (proto_ntmove*) GetProcAddress(kernel32, "MoveFileExA");
|
||||
if (ntmove != 0)
|
||||
{
|
||||
// We are definitely running on a system supporting the
|
||||
|
@ -101,8 +101,9 @@ USHORT SERVICES_install(SC_HANDLE manager,
|
||||
display_name,
|
||||
SERVICE_CHANGE_CONFIG,
|
||||
dwServiceType,
|
||||
(sw_startup == STARTUP_DEMAND) ? SERVICE_DEMAND_START :
|
||||
SERVICE_AUTO_START, SERVICE_ERROR_NORMAL,
|
||||
(sw_startup == STARTUP_DEMAND) ?
|
||||
SERVICE_DEMAND_START : SERVICE_AUTO_START,
|
||||
SERVICE_ERROR_NORMAL,
|
||||
path_name, NULL, NULL, dependencies,
|
||||
nt_user_name, nt_user_password);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user