Re: setpriority(2): booleans are not scalars

2020-09-25 Thread Theo de Raadt
David Riley wrote: > On Sep 25, 2020, at 3:13 PM, Todd C. Miller wrote: > > > > On Fri, 25 Sep 2020 13:58:01 -0500, Scott Cheloha wrote: > > > >> `found' serves as a boolean here. I'd prefer to simple and set it to > >> 1 instead of incrementing it when we find what we're looking for. > > >

Re: setpriority(2): booleans are not scalars

2020-09-25 Thread David Riley
On Sep 25, 2020, at 3:13 PM, Todd C. Miller wrote: > > On Fri, 25 Sep 2020 13:58:01 -0500, Scott Cheloha wrote: > >> `found' serves as a boolean here. I'd prefer to simple and set it to >> 1 instead of incrementing it when we find what we're looking for. > > Makes sense to me, the use of

Re: setpriority(2): booleans are not scalars

2020-09-25 Thread Theo de Raadt
We can't have 2 billion processes to reach a wrap. But I agree, it seems quite wrong, and seems better to just observe match rather than count. Scott Cheloha wrote: > `found' serves as a boolean here. I'd prefer to simple and set it to > 1 instead of incrementing it when we find what we're

Re: setpriority(2): booleans are not scalars

2020-09-25 Thread Todd C . Miller
On Fri, 25 Sep 2020 13:58:01 -0500, Scott Cheloha wrote: > `found' serves as a boolean here. I'd prefer to simple and set it to > 1 instead of incrementing it when we find what we're looking for. Makes sense to me, the use of var++ instead of var=1 is old-school style ;-) - todd

setpriority(2): booleans are not scalars

2020-09-25 Thread Scott Cheloha
`found' serves as a boolean here. I'd prefer to simple and set it to 1 instead of incrementing it when we find what we're looking for. ok? Index: kern_resource.c === RCS file: /cvs/src/sys/kern/kern_resource.c,v retrieving revision