Given that both conditions below print the same message and the only use of result is to test it, why not simply write this as <code>
if (fcntl(...) < 0 || fcntl(...) < 0) { one copy of the failure code } </code> ?