diff options
author | Jeremie Koenig <jk@jk.fr.eu.org> | 2010-08-23 11:24:29 +0000 |
---|---|---|
committer | Jeremie Koenig <jk@jk.fr.eu.org> | 2010-08-30 14:31:21 +0200 |
commit | 0f2bdacd6ad3dbcc905925dee12cb30918c33a11 (patch) | |
tree | fbcadf8294b3314bb0a924339c00bc7bb89d6d79 /netfs.c | |
parent | a269783a41ae8b18e5b24d934c96ce9e90de3067 (diff) | |
download | hurd-0f2bdacd6ad3dbcc905925dee12cb30918c33a11.tar.gz hurd-0f2bdacd6ad3dbcc905925dee12cb30918c33a11.tar.bz2 hurd-0f2bdacd6ad3dbcc905925dee12cb30918c33a11.zip |
Make contents a char* to avoid typecasts all over the place
* procfs.h (procfs_cleanup_contents_with_free,
procfs_cleanup_contents_with_vm_deallocate, procfs_get_contents,
struct procfs_ops): Change CONTENTS from a void pointer to a char one.
* dircat.c, netfs.c, process.c, procfs.c,
procfs_dir.c, proclist.c, rootdir.c: Update.
Diffstat (limited to 'netfs.c')
-rw-r--r-- | netfs.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -29,7 +29,7 @@ int netfs_maxsymlinks = PROCFS_MAXSYMLINKS; responsible for the operation. NP is locked. */ error_t netfs_validate_stat (struct node *np, struct iouser *cred) { - void *contents; + char *contents; size_t contents_len; error_t err; @@ -57,7 +57,7 @@ error_t netfs_attempt_read (struct iouser *cred, struct node *np, size_t contents_len; error_t err; - err = procfs_get_contents (np, (void **) &contents, &contents_len); + err = procfs_get_contents (np, &contents, &contents_len); if (err) return err; @@ -82,7 +82,7 @@ error_t netfs_attempt_readlink (struct iouser *user, struct node *np, size_t contents_len; error_t err; - err = procfs_get_contents (np, (void **) &contents, &contents_len); + err = procfs_get_contents (np, &contents, &contents_len); if (err) return err; @@ -140,7 +140,7 @@ error_t netfs_get_dirents (struct iouser *cred, struct node *dir, size_t contents_len; error_t err; - err = procfs_get_contents (dir, (void **) &contents, &contents_len); + err = procfs_get_contents (dir, &contents, &contents_len); if (err) return err; @@ -159,7 +159,7 @@ error_t netfs_get_dirents (struct iouser *cred, struct node *dir, putentries (contents, contents_len, nentries, NULL, datacnt); if (bufsize < *datacnt) { - void *n = mmap (0, *datacnt, PROT_READ | PROT_WRITE, MAP_ANONYMOUS, 0, 0); + char *n = mmap (0, *datacnt, PROT_READ | PROT_WRITE, MAP_ANONYMOUS, 0, 0); if (n == MAP_FAILED) return ENOMEM; |