Code cleanup

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Slava Zanko 2011-06-19 14:44:50 +03:00
parent 91fe0d71bb
commit c8ae0a5aaf
3 changed files with 3 additions and 22 deletions

View File

@ -232,15 +232,11 @@ char *vfs_get_current_dir (void);
vfs_path_t *vfs_get_raw_current_dir (void);
void vfs_set_raw_current_dir (const vfs_path_t * vpath);
gboolean vfs_current_is_local (void);
gboolean vfs_file_is_local (const vfs_path_t * vpath);
char *vfs_strip_suffix_from_filename (const char *filename);
struct vfs_class *vfs_split (char *path, char **inpath, char **op);
char *vfs_path (const char *path);
vfs_class_flags_t vfs_file_class_flags (const vfs_path_t * vpath);
/* translate path back to terminal encoding, remove all #enc:

View File

@ -261,7 +261,7 @@ is_in_linklist (struct link *lp, const char *path, struct stat *sb)
* and a hardlink was succesfully made
*/
static int
static gboolean
check_hardlinks (const char *src_name, const char *dst_name, struct stat *pstat)
{
struct link *lp;
@ -1359,7 +1359,7 @@ copy_file_file (FileOpTotalContext * tctx, FileOpContext * ctx,
if (!ctx->do_append)
{
/* Check the hardlinks */
if (!ctx->follow_links && sb.st_nlink > 1 && check_hardlinks (src_path, dst_path, &sb) == 1)
if (!ctx->follow_links && sb.st_nlink > 1 && check_hardlinks (src_path, dst_path, &sb))
{
/* We have made a hardlink - no more processing is necessary */
return FILE_CONT;
@ -1753,7 +1753,7 @@ copy_dir_dir (FileOpTotalContext * tctx, FileOpContext * ctx, const char *s, con
/* FIXME: In this step we should do something
in case the destination already exist */
/* Check the hardlinks */
if (ctx->preserve && cbuf.st_nlink > 1 && check_hardlinks (s, d, &cbuf) == 1)
if (ctx->preserve && cbuf.st_nlink > 1 && check_hardlinks (s, d, &cbuf))
{
/* We have made a hardlink - no more processing is necessary */
goto ret_fast;

View File

@ -115,21 +115,6 @@ int fish_directory_timeout = 900;
#define SUP ((fish_super_data_t *) super->data)
#define PREFIX \
char buf[BUF_LARGE]; \
const char *crpath; \
char *rpath, *mpath; \
struct vfs_s_super *super; \
mpath = g_strdup (path); \
crpath = vfs_s_get_path_mangle (me, mpath, &super, 0); \
if (crpath == NULL) \
{ \
g_free (mpath); \
return -1; \
} \
rpath = strutils_shell_escape (crpath); \
g_free (mpath)
/*** file scope type declarations ****************************************************************/
typedef struct