According to the [style guide](http://neovim.org/development-wiki/style-guide/style-guide.xml?showone=Conditionals#Conditionals) we have to add parentheses here
```c
if (result) {
  return FAIL;
}

return OK;
```

Apart from that I'd prefer the current condition `if (result != 0)` over `if (result)` since the latter reads a lot like "if there is a result" but instead means "if the result is not ok". 
Admittedly the reader has to know that `0` is libuvs return value for success. Maybe some constant instead of `0` would make sense here.