]> git.pond.sub.org Git - empserver/commitdiff
Use unsigned instead of unsigned long for fairland's random seed
authorMarkus Armbruster <armbru@pond.sub.org>
Thu, 3 Jan 2013 15:32:08 +0000 (16:32 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Wed, 8 May 2013 04:55:21 +0000 (06:55 +0200)
seed_prng() wants unsigned.  Server uses unsigned already.

src/util/fairland.c

index a7d314f2ec773390bc8c010d5493870fdce043b9..8104d3921d7ec5eab393c52414db9a5b1ebb2377 100644 (file)
@@ -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)