you can write it as 
```
return ret || -1
```