[153567] trunk/base/src/pextlib1.0

raimue at macports.org raimue at macports.org
Tue Oct 4 17:46:21 CEST 2016


Revision: 153567
          https://trac.macports.org/changeset/153567
Author:   raimue at macports.org
Date:     2016-10-04 08:46:20 -0700 (Tue, 04 Oct 2016)
Log Message:
-----------
pextlib: avoid duplicate newlines in log messages

The ui_* functions will already add a newline to the string on output.

Modified Paths:
--------------
    trunk/base/src/pextlib1.0/tracelib.c
    trunk/base/src/pextlib1.0/xinstall.c

Modified: trunk/base/src/pextlib1.0/tracelib.c
===================================================================
--- trunk/base/src/pextlib1.0/tracelib.c	2016-10-04 15:43:41 UTC (rev 153566)
+++ trunk/base/src/pextlib1.0/tracelib.c	2016-10-04 15:46:20 UTC (rev 153567)
@@ -914,11 +914,11 @@
     // Close remainig sockets to avoid dangling processes
     if (opensockcount > 0) {
 #ifdef HAVE_PEERPID_LIST
-        ui_warn(interp, "tracelib: %d open sockets leaking at end of runcmd, closing, sending SIGTERM and SIGKILL\n", opensockcount);
+        ui_warn(interp, "tracelib: %d open sockets leaking at end of runcmd, closing, sending SIGTERM and SIGKILL", opensockcount);
         peerpid_list_walk(close_and_send_sigterm);
         peerpid_list_walk(send_sigkill_and_free);
 #else
-        ui_warn(interp, "tracelib: %d open sockets leaking at end of runcmd\n", opensockcount);
+        ui_warn(interp, "tracelib: %d open sockets leaking at end of runcmd", opensockcount);
 #endif
     }
 

Modified: trunk/base/src/pextlib1.0/xinstall.c
===================================================================
--- trunk/base/src/pextlib1.0/xinstall.c	2016-10-04 15:43:41 UTC (rev 153566)
+++ trunk/base/src/pextlib1.0/xinstall.c	2016-10-04 15:46:20 UTC (rev 153567)
@@ -310,7 +310,7 @@
 			return TCL_ERROR;
 		}
 		else {
-                        ui_info(interp, "%s: chdir(%s)\n", funcname, curdir);
+                        ui_info(interp, "%s: chdir(%s)", funcname, curdir);
 		}
 	}
 
@@ -541,7 +541,7 @@
 				Tcl_SetResult(interp, errmsg, TCL_VOLATILE);
 				return TCL_ERROR;
 			}
-			ui_info(interp, "%s: %s -> %s\n", funcname, from_name, to_name);
+			ui_info(interp, "%s: %s -> %s", funcname, from_name, to_name);
 		}
 		if (!devnull) {
 			if (copy(interp, from_fd, from_name, to_fd,
@@ -643,7 +643,7 @@
 				Tcl_SetResult(interp, errmsg, TCL_VOLATILE);
 				return TCL_ERROR;
 			}
-                        ui_info(interp, "%s: %s -> %s\n", funcname, to_name, backup);
+                        ui_info(interp, "%s: %s -> %s", funcname, to_name, backup);
 			if (rename(to_name, backup) < 0) {
 				char errmsg[255];
 
@@ -656,7 +656,7 @@
 				return TCL_ERROR;
 			}
 		}
-                ui_info(interp, "%s: %s -> %s\n", funcname, from_name, to_name);
+                ui_info(interp, "%s: %s -> %s", funcname, from_name, to_name);
 		if (rename(tempfile, to_name) < 0) {
 			char errmsg[255];
 
@@ -899,7 +899,7 @@
 				return -1;
 			}
 			(void)snprintf(backup, MAXPATHLEN, "%s%s", path, suffix);
-                        ui_info(interp, "%s: %s -> %s\n", funcname, path, backup);
+                        ui_info(interp, "%s: %s -> %s", funcname, path, backup);
 			if (rename(path, backup) < 0) {
 				char errmsg[255];
 
@@ -1057,7 +1057,7 @@
 					return TCL_ERROR;
 				}
 				else {
-                                        ui_info(interp, "%s: mkdir %s\n", funcname, path);
+                                        ui_info(interp, "%s: mkdir %s", funcname, path);
 				}
 			} else if (!S_ISDIR(sb.st_mode)) {
 				char errmsg[255];
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-changes/attachments/20161004/3613189e/attachment-0002.html>


More information about the macports-changes mailing list