mirror of https://github.com/MidnightCommander/mc
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>
This commit is contained in:
parent
0450daf566
commit
d8aa8a3028
|
@ -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))
|
||||
|
|
12
vfs/fish.c
12
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); \
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue