summaryrefslogtreecommitdiff
path: root/netfs.c
diff options
context:
space:
mode:
authorJeremie Koenig <jk@jk.fr.eu.org>2010-08-23 11:24:29 +0000
committerJeremie Koenig <jk@jk.fr.eu.org>2010-08-30 14:31:21 +0200
commit0f2bdacd6ad3dbcc905925dee12cb30918c33a11 (patch)
treefbcadf8294b3314bb0a924339c00bc7bb89d6d79 /netfs.c
parenta269783a41ae8b18e5b24d934c96ce9e90de3067 (diff)
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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/netfs.c b/netfs.c
index a47861e..6fd82a0 100644
--- a/netfs.c
+++ b/netfs.c
@@ -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;