diff options
author | Steve Bennett <steveb@workware.net.au> | 2012-01-19 11:11:59 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2012-01-19 11:13:04 +1000 |
commit | 01cf806d4bc5a87170acbece47d42dd33a092d8d (patch) | |
tree | c3c7c0cfcac3878ba0825caacc5eb19587f7415f /jim-file.c | |
parent | 46fb9d7ffdce5ccb7375f8ca86eca6d328e6363d (diff) | |
download | jimtcl-01cf806d4bc5a87170acbece47d42dd33a092d8d.zip jimtcl-01cf806d4bc5a87170acbece47d42dd33a092d8d.tar.gz jimtcl-01cf806d4bc5a87170acbece47d42dd33a092d8d.tar.bz2 |
Fix some warnings identified by icc
The Intel C Compiler
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim-file.c')
-rw-r--r-- | jim-file.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -430,14 +430,16 @@ static int mkdir_all(char *path) while (ok--) { /* Must have failed the first time, so recursively make the parent and try again */ - char *slash = strrchr(path, '/'); + { + char *slash = strrchr(path, '/'); - if (slash && slash != path) { - *slash = 0; - if (mkdir_all(path) != 0) { - return -1; + if (slash && slash != path) { + *slash = 0; + if (mkdir_all(path) != 0) { + return -1; + } + *slash = '/'; } - *slash = '/'; } first: if (MKDIR_DEFAULT(path) == 0) { |