This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] Eliminate unused parameter from path_conv::eq_worker


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=1dfffe8ef49feec60df9513d9a1f5573faedc357

commit 1dfffe8ef49feec60df9513d9a1f5573faedc357
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Thu Nov 24 15:06:05 2016 +0100

    Eliminate unused parameter from path_conv::eq_worker
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/path.h | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h
index 1af5d22..c6b2d2b 100644
--- a/winsup/cygwin/path.h
+++ b/winsup/cygwin/path.h
@@ -316,8 +316,7 @@ class path_conv
     cfree_and_null (posix_path);
     cfree_and_null (wide_path);
   }
-  path_conv& eq_worker (const path_conv& pc, const char *in_path,
-			const char *in_posix_path)
+  path_conv& eq_worker (const path_conv& pc, const char *in_path)
   {
     free_strings ();
     memcpy (this, &pc, sizeof pc);
@@ -341,7 +340,7 @@ class path_conv
   path_conv &operator << (const path_conv& pc)
   {
     const char *save_path;
-    const char *save_posix_path;
+
     if (!path)
       save_path = pc.path;
     else
@@ -349,19 +348,12 @@ class path_conv
 	save_path = (char *) alloca (strlen (path) + 1);
 	strcpy ((char *) save_path, path);
       }
-    if (!posix_path)
-      save_posix_path = pc.posix_path;
-    else
-      {
-	save_posix_path = (char *) alloca (strlen (posix_path) + 1);
-	strcpy ((char *) save_posix_path, path);
-      }
-    return eq_worker (pc, save_path, save_posix_path);
+    return eq_worker (pc, save_path);
   }
 
   path_conv &operator =(const path_conv& pc)
   {
-    return eq_worker (pc, pc.path, pc.posix_path);
+    return eq_worker (pc, pc.path);
   }
   dev_t get_device () {return dev.get_device ();}
   DWORD file_attributes () const {return fileattr;}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]