sv.c: Rewrite COW logic
authorFather Chrysostomos <sprout@cpan.org>
Sun, 1 Dec 2013 20:16:09 +0000 (12:16 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 1 Dec 2013 20:18:27 +0000 (12:18 -0800)
commit2ac0bcb359f70c09dbac03debcd0a60e8bb49294
tree0f25218e4ace5c7b388e7dcfc0c239ca97fa456a
parentdeed50f208b2fcb0f4861342698ad482b4f2fe60
sv.c: Rewrite COW logic

for readability, maintainability, and my sanity.

The comment about swipe and COW having ‘much in common’ notwithstand-
ing (actually they only shared two lines of code), I separated those
two code paths, splitting the horribly complex ‘if’ condition into
two.  I also made the code slightly more repetitive, resulting in
fewer #ifdefs and more clarity.
sv.c