summaryrefslogtreecommitdiff
path: root/src/utils/mkdir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/mkdir.cpp')
-rw-r--r--src/utils/mkdir.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/mkdir.cpp b/src/utils/mkdir.cpp
index bc089d3d8..4d7312285 100644
--- a/src/utils/mkdir.cpp
+++ b/src/utils/mkdir.cpp
@@ -113,7 +113,7 @@ int mkdir_r(const char *const pathname)
/// Create a directory, making leading components first if necessary
int mkdir_r(const char *const pathname)
{
- const size_t len = static_cast<int>(strlen(pathname));
+ const size_t len = static_cast<size_t>(strlen(pathname));
char *tmp = new char[len + 2];
char *p;
@@ -132,7 +132,7 @@ int mkdir_r(const char *const pathname)
{
*p = '\0';
// ignore a slash at the beginning of a path
- if (strlen(tmp) == 0)
+ if (tmp[0] == 0)
{
*p = '/';
continue;