mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 22:03:03 +01:00
Style.
This commit is contained in:
parent
be64b8fd92
commit
9d0c1dc8f9
@ -84,13 +84,13 @@ const char* PathName::getWorkingDirectory()
|
||||
|
||||
int PathName::findWorkingDirectory(int dpbLength, const UCHAR* dpb, int bufferLength, char* buffer)
|
||||
{
|
||||
const UCHAR *p = dpb, *end = dpb + dpbLength;
|
||||
const UCHAR* p = dpb;
|
||||
const UCHAR* const end = dpb + dpbLength;
|
||||
|
||||
if (dpbLength <= 0 || *p++ != isc_dpb_version1)
|
||||
return 0;
|
||||
|
||||
int length = 0;
|
||||
for (; p < end; p += length)
|
||||
for (int length = 0; p < end; p += length)
|
||||
{
|
||||
const UCHAR verb = *p++;
|
||||
length = *p++;
|
||||
@ -139,19 +139,17 @@ Firebird::string PathName::expandFilename(const char* fileName, const char* work
|
||||
|
||||
int PathName::merge(const char* fileName, const char* workingDirectory, int bufferLength, char* buffer)
|
||||
{
|
||||
const char *p;
|
||||
char *q = buffer;
|
||||
const char *endBuffer = buffer + bufferLength - 1;
|
||||
const char* const endBuffer = buffer + bufferLength - 1;
|
||||
|
||||
if (isAbsolute (fileName))
|
||||
{
|
||||
q = copyCanonical (fileName, buffer, endBuffer);
|
||||
return q - buffer;
|
||||
char* rc = copyCanonical (fileName, buffer, endBuffer);
|
||||
return rc - buffer;
|
||||
}
|
||||
|
||||
// Copy working directory, making slashes canonical
|
||||
|
||||
q = copyCanonical (workingDirectory, buffer, endBuffer);
|
||||
char* q = copyCanonical (workingDirectory, buffer, endBuffer);
|
||||
|
||||
#ifdef _WIN32
|
||||
if (IS_SEPARATOR (fileName [0]))
|
||||
@ -170,7 +168,8 @@ int PathName::merge(const char* fileName, const char* workingDirectory, int buff
|
||||
|
||||
// Handle self relative segments
|
||||
|
||||
for (p = fileName; *p == '.';)
|
||||
const char* p = fileName;
|
||||
while (*p == '.')
|
||||
{
|
||||
if (IS_SEPARATOR (p[1]))
|
||||
p += 2;
|
||||
|
Loading…
Reference in New Issue
Block a user