summaryrefslogtreecommitdiff
path: root/ndb/src/kernel/vm/Configuration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/src/kernel/vm/Configuration.cpp')
-rw-r--r--ndb/src/kernel/vm/Configuration.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/ndb/src/kernel/vm/Configuration.cpp b/ndb/src/kernel/vm/Configuration.cpp
index 931b4da5a17..7c31490959b 100644
--- a/ndb/src/kernel/vm/Configuration.cpp
+++ b/ndb/src/kernel/vm/Configuration.cpp
@@ -281,19 +281,19 @@ static char * get_and_validate_path(ndb_mgm_configuration_iterator &iter,
memset(buf2, 0,sizeof(buf2));
#ifdef NDB_WIN32
char* szFilePart;
- if(!GetFullPathName(path, sizeof(buf2), buf2, &szFilePart)
- || (::GetFileAttributes(alloc_path)&FILE_ATTRIBUTE_READONLY))
+ if(!GetFullPathName(path, sizeof(buf2), buf2, &szFilePart) ||
+ (GetFileAttributes(buf2) & FILE_ATTRIBUTE_READONLY))
#else
- if((::realpath(path, buf2) == NULL)||
+ if((::realpath(path, buf2) == NULL)||
(::access(buf2, W_OK) != 0))
#endif
- {
- ERROR_SET(fatal, AFS_ERROR_INVALIDPATH, path, " Filename::init()");
- }
-
+ {
+ ERROR_SET(fatal, AFS_ERROR_INVALIDPATH, path, " Filename::init()");
+ }
+
if (strcmp(&buf2[strlen(buf2) - 1], DIR_SEPARATOR))
strcat(buf2, DIR_SEPARATOR);
-
+
return strdup(buf2);
}
@@ -561,7 +561,7 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
noOfDBNodes++; // No of NDB processes
if(nodeId > MAX_NDB_NODES){
- snprintf(buf, sizeof(buf), "Maximum node id for a ndb node is: %d",
+ BaseString::snprintf(buf, sizeof(buf), "Maximum node id for a ndb node is: %d",
MAX_NDB_NODES);
ERROR_SET(fatal, ERR_INVALID_CONFIG, msg, buf);
}