pmatilai commented on this pull request.


>       spec->readStack = rl;
        spec->line[0] = '\0';
+    } else if (isElif) {
+       spec->readStack->reading = match && spec->readStack->readable;
+       if (spec->readStack->reading)
+           spec->readStack->readable = 0;
+       spec->line[0] = '\0';
+       match = -1;

I wasn't asking for detailed explanation against my remarks, just  pointing 
(partial) overlap and throwing possible ideas to explore. Like said: knowing 
what's involved and the surrounding, rethink from scratch and see what comes 
up, you can almost always do better the second or even third time around. You 
mentioned corner cases that this doesn't take into account - take them into 
account from the beginning the in the next round. I'm absolutely positive that 
if-elif-else-endif branching can be expressed and tracked in a more coherent 
manner than we have here. As discussed in private this ugly code to begin with, 
take the opportunity to improve the foundation instead of duct-taping over it. 
Sometimes there's no choice but to duct-tape due to time or API constraints but 
neither is an issue here.

-- 
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_r246735540
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to