[Patch] cygcheck: warn about empty path-components

Bas van Gompel cygwin-patches.buzz@bavag.tmfweb.nl
Tue Oct 5 05:15:00 GMT 2004


Hi,

This little patch makes cygcheck warn about empty path-components
(leading/trailing/double ':'/';' in $PATH).


ChangeLog-entry:

2004-10-05  Bas van Gompel  <cygwin-patch.buzz@bavag.tmfweb.nl>

	* cygcheck.cc (dump_sysinfo): Warn about empty path-components.


--- src/winsup/utils/cygcheck.cc	4 Oct 2004 09:42:08 -0000	1.44
+++ src/winsup/utils/cygcheck.cc	5 Oct 2004 02:19:35 -0000
@@ -957,7 +957,10 @@ dump_sysinfo ()
   while (1)
     {
       for (e = s; *e && *e != sep; e++);
-      printf ("\t%.*s\n", e - s, s);
+      if (e-s)
+	printf ("\t%.*s\n", e - s, s);
+      else
+	puts ("\tWarning: Empty path-component");
       count_path_items++;
       if (!*e)
 	break;


L8r,

Buzz.
-- 
  ) |  | ---/ ---/  Yes, this | This message consists of true | I do not
--  |  |   /    /   really is |   and false bits entirely.    | mail for
  ) |  |  /    /    a 72 by 4 +-------------------------------+ any1 but
--  \--| /--- /---  .sigfile. |   |perl -pe "s.u(z)\1.as."    | me. 4^r



More information about the Cygwin-patches mailing list