[107520] trunk/base/src/darwintracelib1.0/darwintrace.c
cal at macports.org
cal at macports.org
Mon Jul 1 17:47:57 PDT 2013
Revision: 107520
https://trac.macports.org/changeset/107520
Author: cal at macports.org
Date: 2013-07-01 17:47:57 -0700 (Mon, 01 Jul 2013)
Log Message:
-----------
darwintrace: remove unneeded debug code, whitespace
Modified Paths:
--------------
trunk/base/src/darwintracelib1.0/darwintrace.c
Modified: trunk/base/src/darwintracelib1.0/darwintrace.c
===================================================================
--- trunk/base/src/darwintracelib1.0/darwintrace.c 2013-07-02 00:41:16 UTC (rev 107519)
+++ trunk/base/src/darwintracelib1.0/darwintrace.c 2013-07-02 00:47:57 UTC (rev 107520)
@@ -382,7 +382,6 @@
sun.sun_family = AF_UNIX;
strncpy(sun.sun_path, __env_darwintrace_log, sizeof(sun.sun_path));
if (connect(sock, (struct sockaddr*)&sun, strlen(__env_darwintrace_log) + 1 + sizeof(sun.sun_family)) != -1) {
- debug_printf("connect successful, socket %d in pid %d\n", sock, __darwintrace_pid);
__darwintrace_fd = sock;
ask_for_filemap();
} else {
@@ -449,11 +448,9 @@
/* clean the path. */
__darwintrace_cleanup_path(somepath);
- size = snprintf(logbuffer, sizeof(logbuffer),
- "%s\t%s",
- op, somepath);
+ size = snprintf(logbuffer, sizeof(logbuffer), "%s\t%s", op, somepath);
- exchange_with_port(logbuffer, size+1, 0);
+ exchange_with_port(logbuffer, size + 1, 0);
return;
}
@@ -463,22 +460,22 @@
*/
static inline void __darwintrace_cleanup_path(char *path) {
size_t pathlen;
-#ifdef __APPLE__
+# ifdef __APPLE__
size_t rsrclen;
-#endif
+# endif
size_t i, shiftamount;
enum { SAWSLASH, NOTHING } state = NOTHING;
/* if this is a foo/..namedfork/rsrc, strip it off */
pathlen = strlen(path);
/* ..namedfork/rsrc is only on OS X */
-#ifdef __APPLE__
+# ifdef __APPLE__
rsrclen = strlen(_PATH_RSRCFORKSPEC);
if (pathlen > rsrclen && 0 == strcmp(path + pathlen - rsrclen, _PATH_RSRCFORKSPEC)) {
path[pathlen - rsrclen] = '\0';
pathlen -= rsrclen;
}
-#endif
+# endif
/* for each position in string (including terminal \0), check if we're in
* a run of multiple slashes, and only emit the first one */
@@ -665,7 +662,6 @@
strcat(normpos, "/");
normpos++;
strcat(normpos, curpos);
- debug_printf("path %s, processing entry %s, normalized %s\n", path, curpos, normalizedpath);
}
if (*normalizedpath == '\0') {
strcat(normalizedpath, "/");
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130701/e991aac7/attachment.html>
More information about the macports-changes
mailing list