Re: Remove redundant continue

2015-12-27 Thread Mark Kettenis
> Date: Sun, 27 Dec 2015 13:48:19 -0500
> From: Michael McConville 
> 
> A trivial simplification, but it's a false positive for an
> inner-loop-continue bug, so it'd be nice to take care of it.
> 
> ok?

The code is easier to understand the way it is now.

> Index: sys/arch/amd64/amd64/intr.c
> ===
> RCS file: /cvs/src/sys/arch/amd64/amd64/intr.c,v
> retrieving revision 1.47
> diff -u -p -r1.47 intr.c
> --- sys/arch/amd64/amd64/intr.c   8 Dec 2015 19:45:55 -   1.47
> +++ sys/arch/amd64/amd64/intr.c   27 Dec 2015 18:43:39 -
> @@ -194,10 +194,8 @@ intr_allocate_slot_cpu(struct cpu_info *
>   slot = i;
>   break;
>   }
> - if (isp == NULL && slot == -1) {
> + if (isp == NULL && slot == -1)
>   slot = i;
> - continue;
> - }
>   }
>   if (slot == -1) {
>   return EBUSY;
> 
> 



Remove redundant continue

2015-12-27 Thread Michael McConville
A trivial simplification, but it's a false positive for an
inner-loop-continue bug, so it'd be nice to take care of it.

ok?


Index: sys/arch/amd64/amd64/intr.c
===
RCS file: /cvs/src/sys/arch/amd64/amd64/intr.c,v
retrieving revision 1.47
diff -u -p -r1.47 intr.c
--- sys/arch/amd64/amd64/intr.c 8 Dec 2015 19:45:55 -   1.47
+++ sys/arch/amd64/amd64/intr.c 27 Dec 2015 18:43:39 -
@@ -194,10 +194,8 @@ intr_allocate_slot_cpu(struct cpu_info *
slot = i;
break;
}
-   if (isp == NULL && slot == -1) {
+   if (isp == NULL && slot == -1)
slot = i;
-   continue;
-   }
}
if (slot == -1) {
return EBUSY;