mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel
This commit is contained in:
commit
93f4be4ba8
|
@ -379,8 +379,8 @@ size_t TRI_StringInt8InPlace (int8_t attr, char* buffer) {
|
|||
char* p;
|
||||
|
||||
if (attr == INT8_MIN) {
|
||||
memcpy(buffer, "-128\0", 4);
|
||||
return 3;
|
||||
memcpy(buffer, "-128\0", 5);
|
||||
return 4;
|
||||
}
|
||||
|
||||
p = buffer;
|
||||
|
|
|
@ -179,12 +179,10 @@ static void RemoveAllLockedFiles (void) {
|
|||
|
||||
for (i = 0; i < FileNames._length; i++) {
|
||||
TRI_UnlinkFile(FileNames._buffer[i]);
|
||||
TRI_RemoveVectorString(&FileNames, i);
|
||||
|
||||
fd = * (int*) TRI_AtVector(&FileDescriptors, i);
|
||||
|
||||
TRI_CLOSE(fd);
|
||||
TRI_RemoveVector(&FileDescriptors, i);
|
||||
}
|
||||
|
||||
TRI_DestroyVectorString(&FileNames);
|
||||
|
@ -405,7 +403,7 @@ bool TRI_ExistsFile (char const* path) {
|
|||
/// @brief creates a directory, recursively
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool TRI_CreateRecursiveDirectory (char const* path) {
|
||||
int TRI_CreateRecursiveDirectory (char const* path) {
|
||||
char* copy;
|
||||
char* p;
|
||||
char* s;
|
||||
|
@ -1492,7 +1490,6 @@ char* TRI_GetAbsolutePath (char const* file, char const* cwd) {
|
|||
|
||||
char* TRI_LocateBinaryPath (char const* argv0) {
|
||||
char const* p;
|
||||
char* dir;
|
||||
char* binaryPath = NULL;
|
||||
size_t i;
|
||||
|
||||
|
@ -1504,15 +1501,11 @@ char* TRI_LocateBinaryPath (char const* argv0) {
|
|||
|
||||
// contains a path
|
||||
if (*p) {
|
||||
dir = TRI_Dirname(argv0);
|
||||
binaryPath = TRI_Dirname(argv0);
|
||||
|
||||
if (dir == 0) {
|
||||
if (binaryPath == 0) {
|
||||
binaryPath = TRI_DuplicateString("");
|
||||
}
|
||||
else {
|
||||
binaryPath = TRI_DuplicateString(dir);
|
||||
TRI_FreeString(TRI_CORE_MEM_ZONE, dir);
|
||||
}
|
||||
}
|
||||
|
||||
// check PATH variable
|
||||
|
|
|
@ -91,7 +91,7 @@ bool TRI_ExistsFile (char const* path);
|
|||
/// @brief creates a directory, recursively
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool TRI_CreateRecursiveDirectory (char const* path);
|
||||
int TRI_CreateRecursiveDirectory (char const* path);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief creates a directory
|
||||
|
|
|
@ -89,8 +89,6 @@ TRI_blob_t* TRI_CopyBlob (TRI_memory_zone_t* zone, TRI_blob_t const* src) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
dst->length = src->length;
|
||||
|
||||
if (src->length == 0 || src->data == NULL) {
|
||||
dst->length = 0;
|
||||
dst->data = NULL;
|
||||
|
@ -115,8 +113,6 @@ TRI_blob_t* TRI_CopyBlob (TRI_memory_zone_t* zone, TRI_blob_t const* src) {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int TRI_CopyToBlob (TRI_memory_zone_t* zone, TRI_blob_t* dst, TRI_blob_t const* src) {
|
||||
dst->length = src->length;
|
||||
|
||||
if (src->length == 0 || src->data == NULL) {
|
||||
dst->length = 0;
|
||||
dst->data = NULL;
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
|
||||
// .............................................................................
|
||||
// Some global variables which may be required throughtout the lifetime of the
|
||||
// Some global variables which may be required throughout the lifetime of the
|
||||
// server
|
||||
// .............................................................................
|
||||
|
||||
|
|
Loading…
Reference in New Issue