updated: [d8aa8a3] Forgot to remove some more .s strings and do a rename in order to prevent compiler warnings + added include



The following commit has been merged in the master branch:
commit d8aa8a302837a84c0ddaf65009b2ce6bc7dcf6dd
Author: Patrick Winnertz <winnie debian org>
Date:   Fri Feb 6 00:34:50 2009 +0100

    Forgot to remove some more .s strings and do a rename in order to prevent compiler warnings + added include
    
    Signed-off-by: Patrick Winnertz <winnie debian org>

diff --git a/mhl/memory.h b/mhl/memory.h
index 3a77934..3268e93 100644
--- a/mhl/memory.h
+++ b/mhl/memory.h
@@ -11,13 +11,13 @@
 #define		mhl_mem_alloc_z(sz)	(calloc(1,sz))
 
 /* free a chunk of memory from stack, passing NULL does no harm */
-static inline void g_free(void* ptr)
+static inline void mhl_mem_free(void* ptr)
 {
     if (ptr) free(ptr);
 }
 
 /* free an ptr and NULL it */
-#define 	MHL_PTR_FREE(ptr)	do { g_free(ptr); (ptr) = NULL; } while (0)
+#define 	MHL_PTR_FREE(ptr)	do { mhl_mem_free(ptr); (ptr) = NULL; } while (0)
 
 /* allocate a chunk on stack - automatically free'd on function exit */
 #define		mhl_stack_alloc(sz)	(alloca(sz))
diff --git a/vfs/fish.c b/vfs/fish.c
index 397d310..2e59c8b 100644
--- a/vfs/fish.c
+++ b/vfs/fish.c
@@ -463,7 +463,7 @@ fish_dir_load(struct vfs_class *me, struct vfs_s_inode *dir, char *remote_path)
 		  "echo '### 500'\n"
 	"fi\n",
 	    quoted_path, quoted_path, quoted_path, quoted_path, quoted_path, quoted_path);
-    g_free (quoted_path.s);
+    g_free (quoted_path);
     ent = vfs_s_generate_entry(me, NULL, dir, 0);
     while (1) {
 	int res = vfs_s_get_line_interruptible (me, buffer, sizeof (buffer), SUP.sockr); 
@@ -735,14 +735,14 @@ fish_file_store(struct vfs_class *me, struct vfs_s_fh *fh, char *name, char *loc
 			  (unsigned long) s.st_size);
     }
     close(h);
-    g_free(quoted_name.s);
+    g_free(quoted_name);
     if ((fish_get_reply (me, SUP.sockr, NULL, 0) != COMPLETE) || was_error)
         ERRNOR (E_REMOTE, -1);
     return 0;
 error_return:
     close(h);
     fish_get_reply(me, SUP.sockr, NULL, 0);
-    g_free(quoted_name.s);
+    g_free(quoted_name);
     return -1;
 }
 
@@ -780,7 +780,7 @@ fish_linear_start (struct vfs_class *me, struct vfs_s_fh *fh, off_t offset)
 		"echo '### 500'\n"
 		"fi\n",
 		quoted_name, quoted_name, quoted_name, quoted_name );
-    g_free (quoted_name.s);
+    g_free (quoted_name);
     if (offset != PRELIM) ERRNOR (E_REMOTE, 0);
     fh->linear = LS_LINEAR_OPEN;
     fh->u.fish.got = 0;
@@ -934,8 +934,8 @@ static int fish_##name (struct vfs_class *me, const char *path1, const char *pat
     rpath2 = mhl_shell_escape_dup (crpath2); \
     g_free (mpath2); \
     g_snprintf(buf, sizeof(buf), string "\n", rpath1, rpath2, rpath1, rpath2); \
-    g_free (rpath1.s); \
-    g_free (rpath2.s); \
+    g_free (rpath1); \
+    g_free (rpath2); \
     return fish_send_command(me, super2, buf, OPT_FLUSH); \
 }
 
diff --git a/vfs/vfs.c b/vfs/vfs.c
index 6995d55..f13d217 100644
--- a/vfs/vfs.c
+++ b/vfs/vfs.c
@@ -38,6 +38,8 @@
 #include <signal.h>
 #include <ctype.h>	/* is_digit() */
 
+#include <mhl/string.h>
+
 #include "../src/global.h"
 #include "../src/tty.h"		/* enable/disable interrupt key */
 #include "../src/wtools.h"	/* message() */

-- 
Midnight Commander Development


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]