patch-2.4.0-test11 linux/net/khttpd/datasending.c

Next file: linux/net/khttpd/main.c
Previous file: linux/net/khttpd/README
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test10/linux/net/khttpd/datasending.c linux/net/khttpd/datasending.c
@@ -58,7 +58,7 @@
 static int sock_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size)
 {
 	int written;
-	unsigned long kaddr;
+	char *kaddr;
 	unsigned long count = desc->count;
 	struct socket *sock = (struct socket *) desc->buf;
 	mm_segment_t old_fs;
@@ -69,7 +69,7 @@
 	set_fs(KERNEL_DS);
 
 	kaddr = kmap(page);
-	written = SendBuffer_async(sock,(char *)kaddr + offset,size);
+	written = SendBuffer_async(sock, kaddr + offset, size);
 	kunmap(page);
 	set_fs(old_fs);
 	if (written < 0) {
@@ -114,7 +114,7 @@
 			
 			inode = CurrentRequest->filp->f_dentry->d_inode;
 			
-			if (inode && inode->i_mapping->a_ops->readpage) {
+			if (inode->i_mapping->a_ops->readpage) {
 				/* This does the actual transfer using sendfile */		
 				read_descriptor_t desc;
 				loff_t *ppos;

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