wm: 5552

Download patch

ref: 8a9c05b991899089f57ef6480d981b45e7489d57
parent: 7fa4a7f3243cfcd2e4c839df66c10147459fb99d
author: mkf <mkf@d510>
date: Sat May 6 00:05:38 EDT 2023

simplify and, make it work on Plan 9, (thanks mh!)

--- a/5551e.c
+++ b/5551e.c
@@ -13,9 +13,9 @@
 
 bool add_bit(bool a, bool b, bool *carry)
 {
-	bool out, temp = carry;
+	bool out, temp = *carry;
 	out = ((a ^ b) ^ temp);
-	carry = (((a ^ b) & temp) | (a & b));
+	*carry = (((a ^ b) & temp) | (a & b));
 	return out;
 }