Hmm ... OK, I'm stupid, of course result is used in the second fcntl()'s parameter.  Still, <code>
int result = fcntl(log_fd, F_GETFD);
if (result < 0 || fcntl(log_fd, F_SETFD, result | FD_CLOEXEC) < 0) { one copy of failure code } </code>
would save duplication.