From: Markus Armbruster Date: Thu, 3 Jan 2013 15:32:08 +0000 (+0100) Subject: Use unsigned instead of unsigned long for fairland's random seed X-Git-Tag: v4.3.31~78 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=ba67bd1f9e450d294e323e4d5092e0ec034593f3 Use unsigned instead of unsigned long for fairland's random seed seed_prng() wants unsigned. Server uses unsigned already. --- diff --git a/src/util/fairland.c b/src/util/fairland.c index a7d314f2e..8104d3921 100644 --- a/src/util/fairland.c +++ b/src/util/fairland.c @@ -123,7 +123,6 @@ static int ctot; /* total number of continents and islands grown */ static int *isecs; /* array of how large each island is */ static int nc, sc, di, sp, pm, ni, is, id; /* the 8 args to this program */ -static unsigned long rnd_seed; /* optional seed argument */ static int *capx, *capy; /* location of the nc capitals */ static int *mc, mcc; /* array and counter used for stability check when perturbing */ @@ -179,10 +178,10 @@ main(int argc, char *argv[]) int opt; char *config_file = NULL; int i = 0; + unsigned rnd_seed = 0; int seed_set = 0; program_name = argv[0]; - rnd_seed = 0; while ((opt = getopt(argc, argv, "ae:hioqR:s:v")) != EOF) { switch (opt) { @@ -233,7 +232,7 @@ main(int argc, char *argv[]) print_vars(); qprint("\n #*# ...fairland rips open a rift in the datumplane... #*#\n\n"); - qprint("seed is %lu\n", rnd_seed); + qprint("seed is %u\n", rnd_seed); do { init(); if (i)