summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2024-10-01 09:22:26 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2024-10-01 09:22:26 +0000
commitd9206fe62689f3ba29a1868df3193345bc077023 (patch)
tree1c141e2e9c119cd5cbfe75ba19d7352e29e38a7c
parent9e31d7c15cc8f9965c5db4feb3c82446cc4ce774 (diff)
Make it more obvious which ruadd argument is the source and which one is
the destination by adding const to the source pointer. OK tb@
-rw-r--r--sys/kern/kern_resource.c7
-rw-r--r--sys/sys/resourcevar.h4
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index 70c2b515034..403f4ad41a2 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_resource.c,v 1.88 2024/08/20 13:29:25 mvs Exp $ */
+/* $OpenBSD: kern_resource.c,v 1.89 2024/10/01 09:22:25 claudio Exp $ */
/* $NetBSD: kern_resource.c,v 1.38 1996/10/23 07:19:38 matthias Exp $ */
/*-
@@ -555,9 +555,10 @@ dogetrusage(struct proc *p, int who, struct rusage *rup)
}
void
-ruadd(struct rusage *ru, struct rusage *ru2)
+ruadd(struct rusage *ru, const struct rusage *ru2)
{
- long *ip, *ip2;
+ long *ip;
+ const long *ip2;
int i;
timeradd(&ru->ru_utime, &ru2->ru_utime, &ru->ru_utime);
diff --git a/sys/sys/resourcevar.h b/sys/sys/resourcevar.h
index e850d76e165..06a00b27f27 100644
--- a/sys/sys/resourcevar.h
+++ b/sys/sys/resourcevar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: resourcevar.h,v 1.32 2024/07/08 13:17:12 claudio Exp $ */
+/* $OpenBSD: resourcevar.h,v 1.33 2024/10/01 09:22:25 claudio Exp $ */
/* $NetBSD: resourcevar.h,v 1.12 1995/11/22 23:01:53 cgd Exp $ */
/*
@@ -107,7 +107,7 @@ lim_cur(int which)
rlim_t lim_cur_proc(struct proc *, int);
-void ruadd(struct rusage *, struct rusage *);
+void ruadd(struct rusage *, const struct rusage *);
void rucheck(void *);
#endif