1
0
Fork 0

Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel

This commit is contained in:
Heiko Kernbach 2013-08-19 09:59:48 +02:00
commit 93f4be4ba8
5 changed files with 7 additions and 18 deletions

View File

@ -379,8 +379,8 @@ size_t TRI_StringInt8InPlace (int8_t attr, char* buffer) {
char* p; char* p;
if (attr == INT8_MIN) { if (attr == INT8_MIN) {
memcpy(buffer, "-128\0", 4); memcpy(buffer, "-128\0", 5);
return 3; return 4;
} }
p = buffer; p = buffer;

View File

@ -179,12 +179,10 @@ static void RemoveAllLockedFiles (void) {
for (i = 0; i < FileNames._length; i++) { for (i = 0; i < FileNames._length; i++) {
TRI_UnlinkFile(FileNames._buffer[i]); TRI_UnlinkFile(FileNames._buffer[i]);
TRI_RemoveVectorString(&FileNames, i);
fd = * (int*) TRI_AtVector(&FileDescriptors, i); fd = * (int*) TRI_AtVector(&FileDescriptors, i);
TRI_CLOSE(fd); TRI_CLOSE(fd);
TRI_RemoveVector(&FileDescriptors, i);
} }
TRI_DestroyVectorString(&FileNames); TRI_DestroyVectorString(&FileNames);
@ -405,7 +403,7 @@ bool TRI_ExistsFile (char const* path) {
/// @brief creates a directory, recursively /// @brief creates a directory, recursively
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
bool TRI_CreateRecursiveDirectory (char const* path) { int TRI_CreateRecursiveDirectory (char const* path) {
char* copy; char* copy;
char* p; char* p;
char* s; char* s;
@ -1492,7 +1490,6 @@ char* TRI_GetAbsolutePath (char const* file, char const* cwd) {
char* TRI_LocateBinaryPath (char const* argv0) { char* TRI_LocateBinaryPath (char const* argv0) {
char const* p; char const* p;
char* dir;
char* binaryPath = NULL; char* binaryPath = NULL;
size_t i; size_t i;
@ -1504,15 +1501,11 @@ char* TRI_LocateBinaryPath (char const* argv0) {
// contains a path // contains a path
if (*p) { if (*p) {
dir = TRI_Dirname(argv0); binaryPath = TRI_Dirname(argv0);
if (dir == 0) { if (binaryPath == 0) {
binaryPath = TRI_DuplicateString(""); binaryPath = TRI_DuplicateString("");
} }
else {
binaryPath = TRI_DuplicateString(dir);
TRI_FreeString(TRI_CORE_MEM_ZONE, dir);
}
} }
// check PATH variable // check PATH variable

View File

@ -91,7 +91,7 @@ bool TRI_ExistsFile (char const* path);
/// @brief creates a directory, recursively /// @brief creates a directory, recursively
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
bool TRI_CreateRecursiveDirectory (char const* path); int TRI_CreateRecursiveDirectory (char const* path);
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/// @brief creates a directory /// @brief creates a directory

View File

@ -89,8 +89,6 @@ TRI_blob_t* TRI_CopyBlob (TRI_memory_zone_t* zone, TRI_blob_t const* src) {
return NULL; return NULL;
} }
dst->length = src->length;
if (src->length == 0 || src->data == NULL) { if (src->length == 0 || src->data == NULL) {
dst->length = 0; dst->length = 0;
dst->data = NULL; 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) { 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) { if (src->length == 0 || src->data == NULL) {
dst->length = 0; dst->length = 0;
dst->data = NULL; dst->data = NULL;

View File

@ -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 // server
// ............................................................................. // .............................................................................