mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 18:43:03 +01:00
Misc and cleanup
This commit is contained in:
parent
e79325330f
commit
32712c2c40
@ -169,7 +169,8 @@ void NoThrowTimeStamp::decode_date(ISC_DATE nday, struct tm* times) throw()
|
|||||||
|
|
||||||
if (month < 10)
|
if (month < 10)
|
||||||
month += 3;
|
month += 3;
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
month -= 9;
|
month -= 9;
|
||||||
year += 1;
|
year += 1;
|
||||||
}
|
}
|
||||||
@ -193,7 +194,8 @@ ISC_DATE NoThrowTimeStamp::encode_date(const struct tm* times) throw()
|
|||||||
|
|
||||||
if (month > 2)
|
if (month > 2)
|
||||||
month -= 3;
|
month -= 3;
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
month += 9;
|
month += 9;
|
||||||
year -= 1;
|
year -= 1;
|
||||||
}
|
}
|
||||||
|
@ -713,7 +713,7 @@ public:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const char* FB_CARG circularAlloc(const char* s, size_t len, intptr_t thr)
|
virtual const char* FB_CARG circularAlloc(const char* s, size_t len, intptr_t /*thr*/)
|
||||||
{
|
{
|
||||||
char* buf = (char*) malloc(len + 1);
|
char* buf = (char*) malloc(len + 1);
|
||||||
memcpy(buf, s, len);
|
memcpy(buf, s, len);
|
||||||
|
@ -131,16 +131,16 @@ public:
|
|||||||
{ return p.calloc(s); }
|
{ return p.calloc(s); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void operator delete(void* mem, MemoryPool& p)
|
void operator delete(void* mem, MemoryPool& /*p*/)
|
||||||
{
|
{
|
||||||
if (mem)
|
if (mem)
|
||||||
p.deallocate(mem);
|
MemoryPool::deallocate(mem); // deallocate is static
|
||||||
}
|
}
|
||||||
|
|
||||||
void operator delete[](void* mem, MemoryPool& p)
|
void operator delete[](void* mem, MemoryPool& /*p*/)
|
||||||
{
|
{
|
||||||
if (mem)
|
if (mem)
|
||||||
p.deallocate(mem);
|
MemoryPool::deallocate(mem); // deallocate is static
|
||||||
}
|
}
|
||||||
|
|
||||||
void operator delete(void* mem)
|
void operator delete(void* mem)
|
||||||
|
@ -67,7 +67,7 @@ struct IndexNode
|
|||||||
static SLONG findPageInDuplicates(const Ods::btree_page* page, UCHAR* pointer,
|
static SLONG findPageInDuplicates(const Ods::btree_page* page, UCHAR* pointer,
|
||||||
SLONG previousNumber, RecordNumber findRecordNumber);
|
SLONG previousNumber, RecordNumber findRecordNumber);
|
||||||
|
|
||||||
bool keyEqual(USHORT length, const UCHAR* data)
|
bool keyEqual(USHORT length, const UCHAR* data) const
|
||||||
{
|
{
|
||||||
if (length != this->length + this->prefix)
|
if (length != this->length + this->prefix)
|
||||||
return false;
|
return false;
|
||||||
|
@ -3254,7 +3254,7 @@ void Attachment::putSlice(IStatus* status, ITransaction* apiTra, ISC_QUAD* id,
|
|||||||
const UCHAR* new_sdl = sdl;
|
const UCHAR* new_sdl = sdl;
|
||||||
|
|
||||||
// CVC: Modified this horrible idea: don't touch input parameters!
|
// CVC: Modified this horrible idea: don't touch input parameters!
|
||||||
// The modified (perhaps) sdl is send to the remote connection. The
|
// The modified (perhaps) sdl is sent to the remote connection. The
|
||||||
// original sdl is used to process the slice data before it is sent.
|
// original sdl is used to process the slice data before it is sent.
|
||||||
// (This is why both 'new_sdl' and 'sdl' are saved in the packet.)
|
// (This is why both 'new_sdl' and 'sdl' are saved in the packet.)
|
||||||
HalfStaticArray<UCHAR, 128> sdl_buffer;
|
HalfStaticArray<UCHAR, 128> sdl_buffer;
|
||||||
|
@ -402,7 +402,7 @@ bool_t xdr_protocol(XDR* xdrs, PACKET* p)
|
|||||||
|
|
||||||
response = &p->p_resp;
|
response = &p->p_resp;
|
||||||
MAP(xdr_short, reinterpret_cast<SSHORT&>(response->p_resp_object));
|
MAP(xdr_short, reinterpret_cast<SSHORT&>(response->p_resp_object));
|
||||||
MAP(xdr_quad, reinterpret_cast<SQUAD&>(response->p_resp_blob_id));
|
MAP(xdr_quad, response->p_resp_blob_id);
|
||||||
MAP(xdr_cstring, response->p_resp_data);
|
MAP(xdr_cstring, response->p_resp_data);
|
||||||
return xdr_status_vector(xdrs, response->p_resp_status_vector) ?
|
return xdr_status_vector(xdrs, response->p_resp_status_vector) ?
|
||||||
P_TRUE(xdrs, p) : P_FALSE(xdrs, p);
|
P_TRUE(xdrs, p) : P_FALSE(xdrs, p);
|
||||||
@ -437,7 +437,7 @@ bool_t xdr_protocol(XDR* xdrs, PACKET* p)
|
|||||||
case op_create_blob:
|
case op_create_blob:
|
||||||
blob = &p->p_blob;
|
blob = &p->p_blob;
|
||||||
MAP(xdr_short, reinterpret_cast<SSHORT&>(blob->p_blob_transaction));
|
MAP(xdr_short, reinterpret_cast<SSHORT&>(blob->p_blob_transaction));
|
||||||
MAP(xdr_quad, reinterpret_cast<SQUAD&>(blob->p_blob_id));
|
MAP(xdr_quad, blob->p_blob_id);
|
||||||
DEBUG_PRINTSIZE(xdrs, p->p_operation);
|
DEBUG_PRINTSIZE(xdrs, p->p_operation);
|
||||||
return P_TRUE(xdrs, p);
|
return P_TRUE(xdrs, p);
|
||||||
|
|
||||||
@ -557,7 +557,7 @@ bool_t xdr_protocol(XDR* xdrs, PACKET* p)
|
|||||||
case op_put_slice:
|
case op_put_slice:
|
||||||
slice = &p->p_slc;
|
slice = &p->p_slc;
|
||||||
MAP(xdr_short, reinterpret_cast<SSHORT&>(slice->p_slc_transaction));
|
MAP(xdr_short, reinterpret_cast<SSHORT&>(slice->p_slc_transaction));
|
||||||
MAP(xdr_quad, reinterpret_cast<SQUAD&>(slice->p_slc_id));
|
MAP(xdr_quad, slice->p_slc_id);
|
||||||
MAP(xdr_long, reinterpret_cast<SLONG&>(slice->p_slc_length));
|
MAP(xdr_long, reinterpret_cast<SLONG&>(slice->p_slc_length));
|
||||||
MAP(xdr_cstring, slice->p_slc_sdl);
|
MAP(xdr_cstring, slice->p_slc_sdl);
|
||||||
MAP(xdr_longs, slice->p_slc_parameters);
|
MAP(xdr_longs, slice->p_slc_parameters);
|
||||||
|
@ -3119,7 +3119,7 @@ ISC_STATUS rem_port::get_slice(P_SLC * stuff, PACKET* sendL)
|
|||||||
P_SLR* response = &sendL->p_slr;
|
P_SLR* response = &sendL->p_slr;
|
||||||
|
|
||||||
response->p_slr_length = rdb->rdb_iface->getSlice(&status_vector,
|
response->p_slr_length = rdb->rdb_iface->getSlice(&status_vector,
|
||||||
transaction->rtr_iface, (ISC_QUAD*) &stuff->p_slc_id, stuff->p_slc_sdl.cstr_length,
|
transaction->rtr_iface, &stuff->p_slc_id, stuff->p_slc_sdl.cstr_length,
|
||||||
stuff->p_slc_sdl.cstr_address, stuff->p_slc_parameters.cstr_length,
|
stuff->p_slc_sdl.cstr_address, stuff->p_slc_parameters.cstr_length,
|
||||||
stuff->p_slc_parameters.cstr_address, stuff->p_slc_length, slice);
|
stuff->p_slc_parameters.cstr_address, stuff->p_slc_length, slice);
|
||||||
|
|
||||||
@ -3506,9 +3506,9 @@ ISC_STATUS rem_port::open_blob(P_OP op, P_BLOB* stuff, PACKET* sendL)
|
|||||||
|
|
||||||
ServBlob iface(op == op_open_blob || op == op_open_blob2 ?
|
ServBlob iface(op == op_open_blob || op == op_open_blob2 ?
|
||||||
rdb->rdb_iface->openBlob(&status_vector, transaction->rtr_iface,
|
rdb->rdb_iface->openBlob(&status_vector, transaction->rtr_iface,
|
||||||
(ISC_QUAD*) &stuff->p_blob_id, bpb_length, bpb) :
|
&stuff->p_blob_id, bpb_length, bpb) :
|
||||||
rdb->rdb_iface->createBlob(&status_vector, transaction->rtr_iface,
|
rdb->rdb_iface->createBlob(&status_vector, transaction->rtr_iface,
|
||||||
(ISC_QUAD*) &sendL->p_resp.p_resp_blob_id, bpb_length, bpb));
|
&sendL->p_resp.p_resp_blob_id, bpb_length, bpb));
|
||||||
|
|
||||||
USHORT object = 0;
|
USHORT object = 0;
|
||||||
if (status_vector.isSuccess())
|
if (status_vector.isSuccess())
|
||||||
@ -4140,7 +4140,7 @@ ISC_STATUS rem_port::put_slice(P_SLC * stuff, PACKET* sendL)
|
|||||||
|
|
||||||
sendL->p_resp.p_resp_blob_id = stuff->p_slc_id;
|
sendL->p_resp.p_resp_blob_id = stuff->p_slc_id;
|
||||||
rdb->rdb_iface->putSlice(&status_vector, transaction->rtr_iface,
|
rdb->rdb_iface->putSlice(&status_vector, transaction->rtr_iface,
|
||||||
(ISC_QUAD*) &sendL->p_resp.p_resp_blob_id,
|
&sendL->p_resp.p_resp_blob_id,
|
||||||
stuff->p_slc_sdl.cstr_length, stuff->p_slc_sdl.cstr_address,
|
stuff->p_slc_sdl.cstr_length, stuff->p_slc_sdl.cstr_address,
|
||||||
stuff->p_slc_parameters.cstr_length, stuff->p_slc_parameters.cstr_address,
|
stuff->p_slc_parameters.cstr_length, stuff->p_slc_parameters.cstr_address,
|
||||||
stuff->p_slc_slice.lstr_length, stuff->p_slc_slice.lstr_address);
|
stuff->p_slc_slice.lstr_length, stuff->p_slc_slice.lstr_address);
|
||||||
|
Loading…
Reference in New Issue
Block a user