aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-07-01 22:01:48 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-07-01 22:01:48 +1200
commit59dba36a9a91d17684e7ea31925a93d465c9d314 (patch)
treea8d99a4d8762a05fd35ee2e026afa4de137fca72 /bin
parent7adef2006aaff89db93c87fd1470a688fb1d4907 (diff)
downloaddotfiles-59dba36a9a91d17684e7ea31925a93d465c9d314.tar.gz
dotfiles-59dba36a9a91d17684e7ea31925a93d465c9d314.zip
Correct srand() arg count
Diffstat (limited to 'bin')
-rw-r--r--bin/rndl.awk5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/rndl.awk b/bin/rndl.awk
index 8359af90..f495a28c 100644
--- a/bin/rndl.awk
+++ b/bin/rndl.awk
@@ -8,7 +8,10 @@ BEGIN {
# Seed the random number generator
"rnds 2>/dev/null" | getline seed
- srand(seed)
+ if (length(seed))
+ srand(seed)
+ else
+ srand()
}
# Iterate over the lines, randomly assigning the first field of each one with a