mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 00:03:03 +01:00
Comments and style.
This commit is contained in:
parent
e4726f1757
commit
7e86de3626
@ -39,17 +39,17 @@ struct FN
|
|||||||
|
|
||||||
static const FN isc_builtin_functions[] =
|
static const FN isc_builtin_functions[] =
|
||||||
{
|
{
|
||||||
/* Internal functions available for QA testing only */
|
// Internal functions available for QA testing only
|
||||||
/* "DEBUG_CRASH_TESTS", "TEST1", QATEST_entrypoint,
|
/*
|
||||||
|
"DEBUG_CRASH_TESTS", "TEST1", QATEST_entrypoint,
|
||||||
|
|
||||||
and so shall it be, *NEVER* include this in a production build
|
and so shall it be, *NEVER* include this in a production build
|
||||||
removed this ugly security hole
|
removed this ugly security hole
|
||||||
FSG 18.Dez.2000
|
FSG 18.Dez.2000
|
||||||
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
{NULL, NULL, NULL} /* End of list marker */
|
{NULL, NULL, NULL} // End of list marker
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -71,16 +71,15 @@ FPTR_INT BUILTIN_entrypoint(const TEXT* module, const TEXT* entrypoint)
|
|||||||
*
|
*
|
||||||
**************************************/
|
**************************************/
|
||||||
|
|
||||||
/* Strip off any preceeding $FIREBIRD path location from the
|
// Strip off any preceeding $FIREBIRD path location from the requested module name.
|
||||||
* requested module name.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const TEXT* modname = module;
|
const TEXT* modname = module;
|
||||||
|
|
||||||
TEXT temp[MAXPATHLEN];
|
TEXT temp[MAXPATHLEN];
|
||||||
gds__prefix(temp, "");
|
gds__prefix(temp, "");
|
||||||
TEXT* p = temp;
|
TEXT* p = temp;
|
||||||
for (p = temp; *p; p++, modname++) {
|
for (p = temp; *p; p++, modname++)
|
||||||
|
{
|
||||||
if (*p != *modname)
|
if (*p != *modname)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -88,7 +87,7 @@ FPTR_INT BUILTIN_entrypoint(const TEXT* module, const TEXT* entrypoint)
|
|||||||
if (!*p)
|
if (!*p)
|
||||||
module = modname;
|
module = modname;
|
||||||
|
|
||||||
/* Strip off any trailing spaces from module name */
|
// Strip off any trailing spaces from module name
|
||||||
|
|
||||||
p = temp;
|
p = temp;
|
||||||
|
|
||||||
@ -97,7 +96,7 @@ FPTR_INT BUILTIN_entrypoint(const TEXT* module, const TEXT* entrypoint)
|
|||||||
|
|
||||||
*p++ = 0;
|
*p++ = 0;
|
||||||
|
|
||||||
/* Strip off any trailing spaces from entrypoint name */
|
// Strip off any trailing spaces from entrypoint name
|
||||||
|
|
||||||
const TEXT* ep = p;
|
const TEXT* ep = p;
|
||||||
|
|
||||||
@ -106,9 +105,10 @@ FPTR_INT BUILTIN_entrypoint(const TEXT* module, const TEXT* entrypoint)
|
|||||||
|
|
||||||
*p = 0;
|
*p = 0;
|
||||||
|
|
||||||
/* Scan the list for a matching (module, entrypoint) name */
|
// Scan the list for a matching (module, entrypoint) name
|
||||||
|
|
||||||
for (const FN* function = isc_builtin_functions; function->fn_module; ++function) {
|
for (const FN* function = isc_builtin_functions; function->fn_module; ++function)
|
||||||
|
{
|
||||||
if (!strcmp(temp, function->fn_module) && !strcmp(ep, function->fn_entrypoint))
|
if (!strcmp(temp, function->fn_module) && !strcmp(ep, function->fn_entrypoint))
|
||||||
{
|
{
|
||||||
return function->fn_function;
|
return function->fn_function;
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include "../jrd/common.h"
|
#include "../jrd/common.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "../jrd/jrd.h" /* For MAXPATHLEN Bug #126614 */
|
#include "../jrd/jrd.h" // For MAXPATHLEN Bug #126614
|
||||||
#include "../jrd/license.h"
|
#include "../jrd/license.h"
|
||||||
#include "../jrd/tra.h"
|
#include "../jrd/tra.h"
|
||||||
#include "../jrd/dsc_proto.h"
|
#include "../jrd/dsc_proto.h"
|
||||||
@ -134,7 +134,8 @@ FPTR_INT FUNCTIONS_entrypoint(const char* module, const char* entrypoint)
|
|||||||
|
|
||||||
*p = 0;
|
*p = 0;
|
||||||
|
|
||||||
for (const FN* function = isc_functions; function->fn_module; ++function) {
|
for (const FN* function = isc_functions; function->fn_module; ++function)
|
||||||
|
{
|
||||||
if (!strcmp(temp, function->fn_module) && !strcmp(ep, function->fn_entrypoint))
|
if (!strcmp(temp, function->fn_module) && !strcmp(ep, function->fn_entrypoint))
|
||||||
{
|
{
|
||||||
return function->fn_function;
|
return function->fn_function;
|
||||||
@ -303,7 +304,8 @@ static SLONG set_context(const vary* ns_vary, const vary* name_vary, const vary*
|
|||||||
|
|
||||||
thread_db* tdbb = JRD_get_thread_data();
|
thread_db* tdbb = JRD_get_thread_data();
|
||||||
|
|
||||||
if (!tdbb) {
|
if (!tdbb)
|
||||||
|
{
|
||||||
// Something is seriously wrong
|
// Something is seriously wrong
|
||||||
fb_assert(false);
|
fb_assert(false);
|
||||||
return 0;
|
return 0;
|
||||||
@ -321,7 +323,8 @@ static SLONG set_context(const vary* ns_vary, const vary* name_vary, const vary*
|
|||||||
|
|
||||||
if (ns_str == USER_SESSION_NAMESPACE)
|
if (ns_str == USER_SESSION_NAMESPACE)
|
||||||
{
|
{
|
||||||
if (!att) {
|
if (!att)
|
||||||
|
{
|
||||||
fb_assert(false);
|
fb_assert(false);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -330,7 +333,8 @@ static SLONG set_context(const vary* ns_vary, const vary* name_vary, const vary*
|
|||||||
}
|
}
|
||||||
else if (ns_str == USER_TRANSACTION_NAMESPACE)
|
else if (ns_str == USER_TRANSACTION_NAMESPACE)
|
||||||
{
|
{
|
||||||
if (!tra) {
|
if (!tra)
|
||||||
|
{
|
||||||
fb_assert(false);
|
fb_assert(false);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user