From 7e0dd590a8f34f4e5e6bbb58b5376fd81ff494f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 18 Apr 2013 14:09:09 +0300 Subject: improve mkdir file. --- src/utils/mkdir.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils/mkdir.cpp b/src/utils/mkdir.cpp index 4d7312285..c723e3321 100644 --- a/src/utils/mkdir.cpp +++ b/src/utils/mkdir.cpp @@ -52,7 +52,7 @@ int mkdir_r(const char *const pathname) strncpy(tmp, pathname, sizeof(tmp) - 1); tmp[PATH_MAX - 1] = '\0'; - int len = static_cast(strlen(tmp)); + const int len = static_cast(strlen(tmp)); if (len < 1) return -1; @@ -174,7 +174,8 @@ int mkdir_r(const char *const pathname) #ifdef M_MKDIR_TEST_ int main(int argc, char** argv) { - if (argc < 2) exit(1); + if (argc < 2) + exit(1); mkdir_r(argv[1]); } #endif -- cgit v1.2.3-70-g09d2