summaryrefslogtreecommitdiffhomepage
path: root/src/misc.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-07-10 12:09:19 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-07-10 12:09:19 +0200
commit44c98968838e1724d1ee77f086c4498f2a3f7643 (patch)
treea3820a9366025b634158c68e9711a2d241d87afa /src/misc.go
parent4ad62aaa6aa269f08c0fdc9c139e6d5417e21746 (diff)
Added replay protection
Diffstat (limited to 'src/misc.go')
-rw-r--r--src/misc.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/misc.go b/src/misc.go
index 75561b2..fc75c0d 100644
--- a/src/misc.go
+++ b/src/misc.go
@@ -19,6 +19,13 @@ func min(a uint, b uint) uint {
return a
}
+func minUint64(a uint64, b uint64) uint64 {
+ if a > b {
+ return b
+ }
+ return a
+}
+
func signalSend(c chan struct{}) {
select {
case c <- struct{}{}: