On 19/09/14 09:05, David Herrmann wrote: >> - fcntl(buffer[0], F_SETPIPE_SZ, BUFFER_SIZE); >> + r = fcntl(buffer[0], F_SETPIPE_SZ, BUFFER_SIZE); >> + if (r < 0) { >> + log_error("Failed to set pipe buffer size: %m"); >> + return -errno; >> + } > > I don't think that's right. Ignoring the return value of that fcntl is > just fine.
An idiom I've found to be useful in cases like this is something like r = whatever(); if (r < 0) { /* ignore failure because [short justification here] */ } which avoids compiler warnings for functions marked with __attribute__(warn_unused_result) (and hopefully also this Coverity warning), while making the intention clear. S _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel