[Rpm-maint] [rpm-software-management/rpm] rpmspec: Support - as input for reading from stdin (PR #1928)
Panu Matilainen
notifications at github.com
Tue Feb 22 07:55:56 UTC 2022
@pmatilai commented on this pull request.
> @@ -385,7 +385,11 @@ static int readLineFromOFI(rpmSpec spec, OFI_t *ofi)
retry:
/* Make sure the current file is open */
if (ofi->fp == NULL) {
- ofi->fp = fopen(ofi->fileName, "r");
+ if (!strcmp(ofi->fileName, "-")) {
I loathe the `!strcmp(...)` use, it's soo easy to misread despite knowing the trick. Please use either explicit `strcmp(...) == 0` or `rstreq()` for comparing string equivalence.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1928#pullrequestreview-889402708
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/1928/review/889402708 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220221/23ac6cdb/attachment-0001.html>
More information about the Rpm-maint
mailing list