Author: Peter Senna Tschudin <peter.senna@gmail.com> Remove double checks, and move the call to print_error to the first check. Replace break by return, and return 0 on success. The simplified version of the coccinelle semantic patch that fixes this issue is as follows: // @@ expression E; identifier pr; expression list es; @@ for(…;…;…){ … – …