diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-04-18 14:09:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-04-18 14:09:09 +0300 |
commit | 7e0dd590a8f34f4e5e6bbb58b5376fd81ff494f0 (patch) | |
tree | bb2fb4780e0a4f4fb1957e9c6e5448ba4418c320 | |
parent | 57312118cd48780f898ba00cddca4bd50b3191e7 (diff) | |
download | mv-7e0dd590a8f34f4e5e6bbb58b5376fd81ff494f0.tar.gz mv-7e0dd590a8f34f4e5e6bbb58b5376fd81ff494f0.tar.bz2 mv-7e0dd590a8f34f4e5e6bbb58b5376fd81ff494f0.tar.xz mv-7e0dd590a8f34f4e5e6bbb58b5376fd81ff494f0.zip |
improve mkdir file.
-rw-r--r-- | src/utils/mkdir.cpp | 5 |
1 files 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<int>(strlen(tmp)); + const int len = static_cast<int>(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 |