patch-pre2.0.14-final2.0 linux/kernel/sysctl.c
Next file: linux/mm/kmalloc.c
Previous file: linux/kernel/printk.c
Back to the patch index
Back to the overall index
- Lines: 19
- Date:
Fri Jun 7 15:45:21 1996
- Orig file:
pre2.0.14/linux/kernel/sysctl.c
- Orig date:
Mon May 13 23:02:50 1996
diff -u --recursive --new-file pre2.0.14/linux/kernel/sysctl.c linux/kernel/sysctl.c
@@ -526,15 +526,13 @@
((char *) table->data)[len] = 0;
filp->f_pos += *lenp;
} else {
- len = strlen(table->data) + 1;
+ len = strlen(table->data);
if (len > table->maxlen)
len = table->maxlen;
if (len > *lenp)
len = *lenp;
- if (len) {
- memcpy_tofs(buffer, table->data, len-1);
- put_user(0, ((char *) buffer) + len - 1);
- }
+ if (len)
+ memcpy_tofs(buffer, table->data, len);
if (len < *lenp) {
put_user('\n', ((char *) buffer) + len);
len++;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this