Fix randomizer

Relying on the system randomizer for unit tests leads to cases where we
don't get deterministic results, which causes inconsistent results.
These random results don't need to be secure, so reimplement as a simple
linear feedback shift register[1].  This makes our unit tests now
produce the same output every time we call generate.

Note, this change showed a weakness in our testing, where timestamps
relied on different rules for ir->cper versus cper->ir.  hour 24 should
be allowed.

[1] https://en.wikipedia.org/wiki/Linear-feedback_shift_register

Change-Id: I0756b086c8ea5fb934e450f5d33e3ae0036868b3
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/cper-utils.c b/cper-utils.c
index ae71dc4..0821a16 100644
--- a/cper-utils.c
+++ b/cper-utils.c
@@ -342,7 +342,7 @@
 		return -1;
 	}
 	int hours = bcd_to_int(timestamp->Hours);
-	if (hours >= 24) {
+	if (hours > 24) {
 		return -1;
 	}
 	int minutes = bcd_to_int(timestamp->Minutes);