summaryrefslogtreecommitdiff
path: root/sys/compat/svr4/svr4_stat.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-01-09 22:27:13 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-01-09 22:27:13 +0000
commit332a483dedd5c976b45635d3ef8337dfdd377f08 (patch)
treebcd0800a8732b7099fd64ce366155836b0f6e6ce /sys/compat/svr4/svr4_stat.c
parentc88cb37963768d4ddbf78335478986b31599e25a (diff)
Remove fetch(9) and store(9) functions from the kernel, and replace the few
remaining instances of them with appropriate copy(9) usage. ok art@, tested on all arches unless my memory is non-ECC
Diffstat (limited to 'sys/compat/svr4/svr4_stat.c')
-rw-r--r--sys/compat/svr4/svr4_stat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/compat/svr4/svr4_stat.c b/sys/compat/svr4/svr4_stat.c
index e72c58b1f81..f41133b1c2b 100644
--- a/sys/compat/svr4/svr4_stat.c
+++ b/sys/compat/svr4/svr4_stat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: svr4_stat.c,v 1.22 2002/03/14 20:31:31 mickey Exp $ */
+/* $OpenBSD: svr4_stat.c,v 1.23 2003/01/09 22:27:11 miod Exp $ */
/* $NetBSD: svr4_stat.c,v 1.21 1996/04/22 01:16:07 christos Exp $ */
/*
@@ -654,9 +654,11 @@ svr4_sys_systeminfo(p, v, retval)
return 0;
if (len > rlen) {
+ char nul = 0;
+
/* if str overruns buffer, put NUL in last place */
len = rlen - 1;
- if (subyte(SCARG(uap, buf) + len, 0) < 0)
+ if (copyout(&nul, SCARG(uap, buf), sizeof(char)) != 0)
return EFAULT;
}