[Rpm-maint] [rpm-software-management/rpm] No build directives in generated spec parts (PR #2917)

Panu Matilainen notifications at github.com
Thu Feb 29 11:31:28 UTC 2024


@pmatilai commented on this pull request.



> +	    return p->token;
+	}
+    }
+    return NULL;
+}
+
+static const int partBeforeBuildOnly(int part)
+{
+    const struct PartRec *p;
+
+    for (p = partList; p->token != NULL; p++) {
+	if (p->part == part) {
+	    return p->beforebuildonly;
+	}
+    }
+    return 0;

I'd combine these two into findPart() that returns a pointer to the struct, whose values you can then just use directly in the caller.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2917#pullrequestreview-1908632646
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2917/review/1908632646 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240229/3e6b03de/attachment.html>


More information about the Rpm-maint mailing list