From: claudio Date: Tue, 1 Oct 2024 09:22:25 +0000 (+0000) Subject: Make it more obvious which ruadd argument is the source and which one is X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=82bcd5c47070bb23e06356a61b4d2780a14d7780;p=openbsd 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@ --- 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