Reduce indentation level by early returning or continuing loop

Replace code like this

```c
func() {
    if (cond) {
	...
	...
	...
    }
    return ret;
}
```

```c
for (...) {
    if (cond) {
	...
	...
	...
    }
}
```

with

```c
func() {
    if (!cond) {
	return ret;
    }
    ...
    ...
    ...
}
```

```c
for (...) {
    if (!cond) {
	continue;
    }
    ...
    ...
    ...
}
```
Simple refatorings that didn't fit the pattern of the last commit
Merge pull request #1661 from philix/early_exit

Reduce indentation level by early returning or continuing loop