pavlinamv commented on this pull request.


> @@ -360,7 +364,10 @@ do { \
 int readLine(rpmSpec spec, int strip)
 {
     char *s;
-    int match;
+    char *z;
+    int match = 0;
+    int isIf = 0;
+    int isElif = 0;

Yes a line can be `%if` line, `%elif` line or "another" line. 

Yes, in some earlier version were only two variables: `isElif` + `match`. The 
meaning of variable `match` was quite unclear.
 ` 0 .... %if or %else line + condition after %if is not satisfied`
 ` 1 .... %if or %else line + condition after %if is satisfied`
`-1  ... %if or %else line + condition after %if is bad, or `
`  ......     not %if or %elif line`
`match` was used for both: deciding whether line is `%if` line and deciding, 
whether the condition after `%if` (resp. `%ifos`, ...) is satisfied.

That is why I made the first patch of this PR. In the patch I refactored 
`match` into two variables: `match` + `isIf` to have clean meaning and usage. 

Variables `isIf` and `isElif` can be consolidated into one. I will change 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/613#discussion_r246402912
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to