patch-2.4.0-test11 linux/fs/ncpfs/mmap.c

Next file: linux/fs/ncpfs/ncplib_kernel.c
Previous file: linux/fs/ncpfs/ioctl.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test10/linux/fs/ncpfs/mmap.c linux/fs/ncpfs/mmap.c
@@ -37,7 +37,7 @@
 	struct dentry *dentry = file->f_dentry;
 	struct inode *inode = dentry->d_inode;
 	struct page* page;
-	unsigned long pg_addr;
+	char *pg_addr;
 	unsigned int already_read;
 	unsigned int count;
 	int bufsize;
@@ -71,7 +71,7 @@
 			if (ncp_read_kernel(NCP_SERVER(inode),
 				     NCP_FINFO(inode)->file_handle,
 				     pos, to_read,
-				     (char *) (pg_addr + already_read),
+				     pg_addr + already_read,
 				     &read_this_time) != 0) {
 				read_this_time = 0;
 			}
@@ -87,8 +87,7 @@
 	}
 
 	if (already_read < PAGE_SIZE)
-		memset((char*)(pg_addr + already_read), 0, 
-		       PAGE_SIZE - already_read);
+		memset(pg_addr + already_read, 0, PAGE_SIZE - already_read);
 	flush_dcache_page(page);
 	kunmap(page);
 	return page;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)