Ah, 0 was of course the first value I tested. So what did you meant with your original suggestion?
```C
int ffs(int i)
{
    if (i > 0) {
        return number_of_lowest_bit(i);
    } else {
        // other options
    }
}
```
or
```C
#define number_of_lowest_bit(i) __builtin_ffs(i)-1 
```