Re: [PATCH] check_do_while_loop_limit: implements checker for do_while loops
Dan Carpenter <[email protected]> Tue, 27 Jul 2021 12:39:36 +0300
| Newsgroups | org.kernel.vger.smatch |
|---|---|
| Message-ID | <20210727093936.GK1931@kadam> |
On Mon, Jul 26, 2021 at 07:24:12PM +0530, Harshvardhan Jha wrote:
> do{} while(n--) loops end at n=-1 but programmers sometimes assume that
> they end at n=0. This checker sends a warning in these scenarios.
>
> Signed-off-by: Harshvardhan Jha <[email protected]>
Thanks a lot! Applied.
regards,
dan carpenter