[llvm-commits] [llvm] r157451 - /llvm/trunk/runtime/libprofile/GCDAProfiling.c
Bill Wendling
isanbard at gmail.com
Thu May 24 17:57:22 PDT 2012
Author: void
Date: Thu May 24 19:57:21 2012
New Revision: 157451
URL: http://llvm.org/viewvc/llvm-project?rev=157451&view=rev
Log:
Early-continue.Reducing indentation.
Modified:
llvm/trunk/runtime/libprofile/GCDAProfiling.c
Modified: llvm/trunk/runtime/libprofile/GCDAProfiling.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/runtime/libprofile/GCDAProfiling.c?rev=157451&r1=157450&r2=157451&view=diff
==============================================================================
--- llvm/trunk/runtime/libprofile/GCDAProfiling.c (original)
+++ llvm/trunk/runtime/libprofile/GCDAProfiling.c Thu May 24 19:57:21 2012
@@ -85,17 +85,16 @@
int i, e;
for (i = 1, e = strlen(filename); i != e; ++i) {
- if (filename[i] == '/') {
- pathname = malloc(i + 1);
- strncpy(pathname, filename, i);
- pathname[i] = '\0';
+ if (filename[i] != '/') continue;
+ pathname = malloc(i + 1);
+ strncpy(pathname, filename, i);
+ pathname[i] = '\0';
#ifdef _WIN32
- _mkdir(pathname);
+ _mkdir(pathname);
#else
- mkdir(pathname, 0750); /* some of these will fail, ignore it. */
+ mkdir(pathname, 0750); /* some of these will fail, ignore it. */
#endif
- free(pathname);
- }
+ free(pathname);
}
}
More information about the llvm-commits
mailing list