From 86baadb5e225e1fd930592a0da04ffcea2699656 Mon Sep 17 00:00:00 2001
From: Vit Rosin <vit_r@list.ru>
Date: Wed, 3 Mar 2010 16:55:26 +0000
Subject: [PATCH] removing unused parm struct vfs_class *
---
lib/vfs/mc-vfs/extfs.c | 8 ++------
lib/vfs/mc-vfs/ftpfs.c | 4 +---
lib/vfs/mc-vfs/sfs.c | 8 ++------
lib/vfs/mc-vfs/vfs-impl.h | 4 ++--
lib/vfs/mc-vfs/vfs.c | 4 ++--
5 files changed, 9 insertions(+), 19 deletions(-)
diff --git a/lib/vfs/mc-vfs/extfs.c b/lib/vfs/mc-vfs/extfs.c
index 752ec99..b16246e 100644
a
|
b
|
extfs_get_plugins (const char *where, gboolean silent) |
1516 | 1516 | |
1517 | 1517 | |
1518 | 1518 | static int |
1519 | | extfs_init (struct vfs_class *me) |
| 1519 | extfs_init (void) |
1520 | 1520 | { |
1521 | 1521 | gboolean d1, d2; |
1522 | 1522 | char *dirname; |
1523 | 1523 | |
1524 | | (void) me; |
1525 | | |
1526 | 1524 | /* 1st: scan user directory */ |
1527 | 1525 | dirname = g_build_path (PATH_SEP_STR, home_dir, MC_USERCONF_DIR, (char *) NULL); |
1528 | 1526 | d1 = extfs_get_plugins (dirname, TRUE); /* silent about user dir */ |
… |
… |
extfs_init (struct vfs_class *me) |
1534 | 1532 | } |
1535 | 1533 | |
1536 | 1534 | static void |
1537 | | extfs_done (struct vfs_class *me) |
| 1535 | extfs_done (void) |
1538 | 1536 | { |
1539 | 1537 | size_t i; |
1540 | 1538 | struct archive *ar; |
1541 | 1539 | |
1542 | | (void) me; |
1543 | | |
1544 | 1540 | for (ar = first_archive; ar != NULL;) |
1545 | 1541 | { |
1546 | 1542 | extfs_free ((vfsid) ar); |
diff --git a/lib/vfs/mc-vfs/ftpfs.c b/lib/vfs/mc-vfs/ftpfs.c
index 93bfab6..581ce93 100644
a
|
b
|
static int ftpfs_fh_close (struct vfs_class *me, struct vfs_s_fh *fh) |
1835 | 1835 | } |
1836 | 1836 | |
1837 | 1837 | static void |
1838 | | ftpfs_done (struct vfs_class *me) |
| 1838 | ftpfs_done (void) |
1839 | 1839 | { |
1840 | 1840 | struct no_proxy_entry *np; |
1841 | 1841 | |
1842 | | (void) me; |
1843 | | |
1844 | 1842 | while (no_proxy) { |
1845 | 1843 | np = no_proxy->next; |
1846 | 1844 | g_free (no_proxy->domain); |
diff --git a/lib/vfs/mc-vfs/sfs.c b/lib/vfs/mc-vfs/sfs.c
index a5a2423..85fff22 100644
a
|
b
|
sfs_ungetlocalcopy (struct vfs_class *me, const char *path, |
336 | 336 | return 0; |
337 | 337 | } |
338 | 338 | |
339 | | static int sfs_init (struct vfs_class *me) |
| 339 | static int sfs_init (void) |
340 | 340 | { |
341 | 341 | char *mc_sfsini; |
342 | 342 | FILE *cfg; |
343 | 343 | char key[256]; |
344 | 344 | |
345 | | (void) me; |
346 | | |
347 | 345 | mc_sfsini = g_build_filename (mc_home, "sfs.ini", (char *) NULL); |
348 | 346 | cfg = fopen (mc_sfsini, "r"); |
349 | 347 | |
… |
… |
static int sfs_init (struct vfs_class *me) |
407 | 405 | } |
408 | 406 | |
409 | 407 | static void |
410 | | sfs_done (struct vfs_class *me) |
| 408 | sfs_done (void) |
411 | 409 | { |
412 | 410 | int i; |
413 | 411 | |
414 | | (void) me; |
415 | | |
416 | 412 | for (i = 0; i < sfs_no; i++){ |
417 | 413 | g_free (sfs_prefix [i]); |
418 | 414 | g_free (sfs_command [i]); |
diff --git a/lib/vfs/mc-vfs/vfs-impl.h b/lib/vfs/mc-vfs/vfs-impl.h
index 02e5520..b91e98c 100644
a
|
b
|
struct vfs_class { |
35 | 35 | void *data; /* this is for filesystem's own use */ |
36 | 36 | int verrno; /* can't use errno because glibc2 might define errno as function */ |
37 | 37 | |
38 | | int (*init) (struct vfs_class *me); |
39 | | void (*done) (struct vfs_class *me); |
| 38 | int (*init) (void); |
| 39 | void (*done) (void); |
40 | 40 | |
41 | 41 | /** |
42 | 42 | * The fill_names method shall call the callback function for every |
diff --git a/lib/vfs/mc-vfs/vfs.c b/lib/vfs/mc-vfs/vfs.c
index 14d2c0c..693de04 100644
a
|
b
|
int |
193 | 193 | vfs_register_class (struct vfs_class *vfs) |
194 | 194 | { |
195 | 195 | if (vfs->init) /* vfs has own initialization function */ |
196 | | if (!(*vfs->init)(vfs)) /* but it failed */ |
| 196 | if (!(*vfs->init)()) /* but it failed */ |
197 | 197 | return 0; |
198 | 198 | |
199 | 199 | vfs->next = vfs_list; |
… |
… |
vfs_shut (void) |
1313 | 1313 | |
1314 | 1314 | for (vfs = vfs_list; vfs; vfs = vfs->next) |
1315 | 1315 | if (vfs->done) |
1316 | | (*vfs->done) (vfs); |
| 1316 | (*vfs->done) (); |
1317 | 1317 | |
1318 | 1318 | g_ptr_array_free (vfs_openfiles, TRUE); |
1319 | 1319 | g_string_free (vfs_str_buffer, TRUE); |