From 4bc786735e24a2647d8d7991ad94293b7ae769db Mon Sep 17 00:00:00 2001 From: Roland Illig Date: Fri, 24 Sep 2004 15:08:21 +0000 Subject: [PATCH] * cpio.c: Replaced NULL with (char *) NULL. Likewise for 0, where NULL was meant. * direntry.c: Likewise. * extfs.c: Likewise. * fish.c: Likewise. * ftpfs.c: Likewise. * mcfs.c: Likewise. * tar.c: Likewise. * undelfs.c: Likewise. * vfs.c: Likewise. --- vfs/ChangeLog | 13 +++++++++++++ vfs/cpio.c | 2 +- vfs/direntry.c | 4 ++-- vfs/extfs.c | 8 ++++---- vfs/fish.c | 8 ++++---- vfs/ftpfs.c | 4 ++-- vfs/mcfs.c | 2 +- vfs/tar.c | 2 +- vfs/undelfs.c | 4 ++-- vfs/vfs.c | 2 +- 10 files changed, 31 insertions(+), 18 deletions(-) diff --git a/vfs/ChangeLog b/vfs/ChangeLog index 3670717e4..5aa18c73b 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,16 @@ +2004-09-24 Roland Illig + + * cpio.c: Replaced NULL with (char *) NULL. Likewise for 0, where + NULL was meant. + * direntry.c: Likewise. + * extfs.c: Likewise. + * fish.c: Likewise. + * ftpfs.c: Likewise. + * mcfs.c: Likewise. + * tar.c: Likewise. + * undelfs.c: Likewise. + * vfs.c: Likewise. + 2004-09-23 Roland Illig * cpio.c (cpio_read_bin_head): Replaced GUINT16_SWAP_LE_BE with diff --git a/vfs/cpio.c b/vfs/cpio.c index e6e6feeab..126f532e7 100644 --- a/vfs/cpio.c +++ b/vfs/cpio.c @@ -160,7 +160,7 @@ cpio_open_cpio_file (struct vfs_class *me, struct vfs_s_super *super, char *s; mc_close (fd); - s = g_strconcat (name, decompress_extension (type), NULL); + s = g_strconcat (name, decompress_extension (type), (char *) NULL); if ((fd = mc_open (s, O_RDONLY)) == -1) { message (1, MSG_ERROR, _("Cannot open cpio archive\n%s"), s); g_free (s); diff --git a/vfs/direntry.c b/vfs/direntry.c index 3ab3398da..e17fb22ad 100644 --- a/vfs/direntry.c +++ b/vfs/direntry.c @@ -540,7 +540,7 @@ vfs_s_fullpath (struct vfs_class *me, struct vfs_s_inode *ino) ino = ino->ent->dir; if (ino == ino->super->root) break; - newpath = g_strconcat (ino->ent->name, "/", path, NULL); + newpath = g_strconcat (ino->ent->name, "/", path, (char *) NULL); g_free (path); path = newpath; } @@ -552,7 +552,7 @@ vfs_s_fullpath (struct vfs_class *me, struct vfs_s_inode *ino) return g_strdup (ino->ent->name); return g_strconcat (ino->ent->dir->ent->name, PATH_SEP_STR, - ino->ent->name, NULL); + ino->ent->name, (char *) NULL); } /* Support of archives */ diff --git a/vfs/extfs.c b/vfs/extfs.c index 754629819..ea5cff22c 100644 --- a/vfs/extfs.c +++ b/vfs/extfs.c @@ -113,7 +113,7 @@ extfs_fill_names (struct vfs_class *me, fill_names_f func) while (a) { name = g_strconcat (a->name ? a->name : "", "#", - extfs_prefixes[a->fstype], NULL); + extfs_prefixes[a->fstype], (char *) NULL); (*func) (name); g_free (name); a = a->next; @@ -240,7 +240,7 @@ extfs_open_archive (int fstype, const char *name, struct archive **pparc) mc_extfsdir = concat_dir_and_file (mc_home, "extfs" PATH_SEP_STR); cmd = g_strconcat (mc_extfsdir, extfs_prefixes[fstype], " list ", - local_name ? local_name : tmp, NULL); + local_name ? local_name : tmp, (char *) NULL); if (tmp) g_free (tmp); g_free (mc_extfsdir); @@ -621,7 +621,7 @@ extfs_cmd (const char *extfs_cmd, struct archive *archive, mc_extfsdir = concat_dir_and_file (mc_home, "extfs" PATH_SEP_STR); cmd = g_strconcat (mc_extfsdir, extfs_prefixes[archive->fstype], extfs_cmd, archive_name, " ", quoted_file, " ", - quoted_localname, NULL); + quoted_localname, (char *) NULL); g_free (quoted_file); g_free (quoted_localname); g_free (mc_extfsdir); @@ -649,7 +649,7 @@ extfs_run (const char *file) archive_name = name_quote (extfs_get_archive_name (archive), 0); mc_extfsdir = concat_dir_and_file (mc_home, "extfs" PATH_SEP_STR); cmd = g_strconcat (mc_extfsdir, extfs_prefixes[archive->fstype], - " run ", archive_name, " ", q, NULL); + " run ", archive_name, " ", q, (char *) NULL); g_free (mc_extfsdir); g_free (archive_name); g_free (q); diff --git a/vfs/fish.c b/vfs/fish.c index e81c312eb..d14c7f27b 100644 --- a/vfs/fish.c +++ b/vfs/fish.c @@ -201,7 +201,7 @@ fish_pipeopen(struct vfs_s_super *super, const char *path, const char *argv[]) static char *fish_getcwd(struct vfs_class *me, struct vfs_s_super *super) { if (fish_command (me, super, WANT_STRING, "#PWD\npwd; echo '### 200'\n") == COMPLETE) - return g_strconcat (reply_str, "/", NULL); + return g_strconcat (reply_str, "/", (char *) NULL); ERRNOR (EIO, NULL); } @@ -247,7 +247,7 @@ fish_open_archive_int (struct vfs_class *me, struct vfs_s_super *super) if (!SUP.password) { char *p, *op; p = g_strconcat (_(" fish: Password required for "), - SUP.user, " ", NULL); + SUP.user, " ", (char *) NULL); op = vfs_get_password (p); g_free (p); if (op == NULL) @@ -291,7 +291,7 @@ fish_open_archive_int (struct vfs_class *me, struct vfs_s_super *super) print_vfs_message (_("fish: Connected, home %s."), SUP.cwdir); #if 0 super->name = - g_strconcat ("/#sh:", SUP.user, "@", SUP.host, "/", NULL); + g_strconcat ("/#sh:", SUP.user, "@", SUP.host, "/", (char *) NULL); #endif super->name = g_strdup (PATH_SEP_STR); @@ -876,7 +876,7 @@ fish_fill_names (struct vfs_class *me, fill_names_f func) } name = g_strconcat ("/#sh:", SUP.user, "@", SUP.host, flags, - "/", SUP.cwdir, NULL); + "/", SUP.cwdir, (char *) NULL); (*func)(name); g_free (name); super = super->next; diff --git a/vfs/ftpfs.c b/vfs/ftpfs.c index 5c815b7cd..7d4a07767 100644 --- a/vfs/ftpfs.c +++ b/vfs/ftpfs.c @@ -439,7 +439,7 @@ ftpfs_login_server (struct vfs_class *me, struct vfs_s_super *super, if (!anon || MEDATA->logfile) pass = op; else { - pass = g_strconcat ("-", op, NULL); + pass = g_strconcat ("-", op, (char *) NULL); wipe_password (op); } @@ -1661,7 +1661,7 @@ ftpfs_fill_names (struct vfs_class *me, fill_names_f func) char *name; while (super){ - name = g_strconcat ("/#ftp:", SUP.user, "@", SUP.host, "/", SUP.cwdir, NULL); + name = g_strconcat ("/#ftp:", SUP.user, "@", SUP.host, "/", SUP.cwdir, (char *) NULL); (*func)(name); g_free (name); super = super->next; diff --git a/vfs/mcfs.c b/vfs/mcfs.c index d619c64bc..4f6f663d0 100644 --- a/vfs/mcfs.c +++ b/vfs/mcfs.c @@ -100,7 +100,7 @@ mcfs_fill_names (struct vfs_class *me, fill_names_f func) if (mcfs_connections[i].host == 0) continue; name = g_strconcat ("/#mc:", mcfs_connections[i].user, - "@", mcfs_connections[i].host, NULL); + "@", mcfs_connections[i].host, (char *) NULL); (*func) (name); g_free (name); } diff --git a/vfs/tar.c b/vfs/tar.c index a8b490735..2b71476b0 100644 --- a/vfs/tar.c +++ b/vfs/tar.c @@ -221,7 +221,7 @@ tar_open_archive_int (struct vfs_class *me, const char *name, if (type != COMPRESSION_NONE) { char *s; mc_close (result); - s = g_strconcat (archive->name, decompress_extension (type), NULL); + s = g_strconcat (archive->name, decompress_extension (type), (char *) NULL); result = mc_open (s, O_RDONLY); if (result == -1) message (1, MSG_ERROR, _("Cannot open tar archive\n%s"), s); diff --git a/vfs/undelfs.c b/vfs/undelfs.c index 1fac3c5f4..d46d6899a 100644 --- a/vfs/undelfs.c +++ b/vfs/undelfs.c @@ -141,14 +141,14 @@ undelfs_get_path (const char *dirname, char **fsname, char **file) *file = g_strdup (p+1); tmp = g_strndup (dirname, p - dirname); - *fsname = g_strconcat ("/dev/", tmp, NULL); + *fsname = g_strconcat ("/dev/", tmp, (char *) NULL); g_free (tmp); return; } p--; } *file = g_strdup (""); - *fsname = g_strconcat ("/dev/", dirname, NULL); + *fsname = g_strconcat ("/dev/", dirname, (char *) NULL); return; } diff --git a/vfs/vfs.c b/vfs/vfs.c index c27673fb7..17dfefe7b 100644 --- a/vfs/vfs.c +++ b/vfs/vfs.c @@ -978,7 +978,7 @@ char * vfs_translate_url (const char *url) { if (strncmp (url, "ftp://", 6) == 0) - return g_strconcat ("/#ftp:", url + 6, NULL); + return g_strconcat ("/#ftp:", url + 6, (char *) NULL); else if (strncmp (url, "a:", 2) == 0) return g_strdup ("/#a"); else