On Tue, May 03, 2016 at 10:47:51PM +0300, Vadim Zhukov wrote:
> @@ -333,10 +336,12 @@ kvm_deadfile_byid(kvm_t *kd, int op, int
>                       goto cleanup;
>               }
>  
> -             if (op == KERN_FILE_BYPID && arg > 0 &&
> -                 proc.p_pid != (pid_t)arg) {
> -                             /* not the pid we are looking for */
> +             if (op == KERN_FILE_BYPID) {
> +                     /* check if this is the pid we are looking for */
> +                     if (arg > 0 && proc.p_pid != (pid_t)arg)
>                               continue;
> +                     else
> +                             matched = 1;
>               }
>  
>               if (KREAD(kd, (u_long)process.ps_ucred, &ucred)) {

Can you move the matched = 1 out of the else path to make the code
look like in the kernel?

anyway ok bluhm@

Reply via email to