[Rpm-maint] [rpm-software-management/rpm] [WIP] Added fapolicyd plugin (#1475)
Panu Matilainen
notifications at github.com
Wed Jan 27 13:52:34 UTC 2021
@pmatilai commented on this pull request.
> +
+static rpmRC open_fifo(struct fapolicyd_data* state)
+{
+ int fd = -1;
+ struct stat s;
+
+ fd = open(state->fifo_path, O_RDWR);
+ if(fd == -1) {
+ rpmlog(RPMLOG_DEBUG, "Open: %s -> %s\n", state->fifo_path, strerror(errno));
+ goto bad;
+ }
+
+ if (stat(state->fifo_path, &s) == -1) {
+ rpmlog(RPMLOG_DEBUG, "Stat: %s -> %s\n", state->fifo_path, strerror(errno));
+ goto bad;
+ } else {
This else-branch is redundant now with the gotos. Not wrong, but mildly confusing when there's no need for it.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1475#pullrequestreview-577355121
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210127/37c64343/attachment-0001.html>
More information about the Rpm-maint
mailing list