patch-2.1.112 linux/drivers/misc/parport_procfs.c

Next file: linux/drivers/net/3c509.c
Previous file: linux/drivers/char/vt.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.111/linux/drivers/misc/parport_procfs.c linux/drivers/misc/parport_procfs.c
@@ -182,6 +182,8 @@
 	int len = 0;
 	const char *str;
 
+	page[0] = '\0';
+
 	if ((str = pp->probe_info.class_name) != NULL)
 		len += sprintf (page+len, "CLASS:%s;\n", str);
 
@@ -199,7 +201,7 @@
 
 	*start = 0;
 	*eof   = 1;
-	return strlen (page);
+	return len;
 }
 
 static inline void destroy_proc_entry(struct proc_dir_entry *root, 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov