cpu: Fix TrafficGen message format
authorWendy Elsasser <wendy.elsasser@arm.com>
Thu, 19 Mar 2015 08:06:12 +0000 (04:06 -0400)
committerWendy Elsasser <wendy.elsasser@arm.com>
Thu, 19 Mar 2015 08:06:12 +0000 (04:06 -0400)
Fix erroneous message format for fatal error.
Previously, code did not have type indicator (% instead of %d).

Also removed redundant fatal check.

Ran modified sweep.py with in range and out of range values to test.

src/cpu/testers/traffic_gen/traffic_gen.cc

index e4759512dd4e073e7f4c8a66fe806ff2a2b98443..9f31926561616ba0f57c6ebfa26509c24ce9e47b 100644 (file)
@@ -331,13 +331,8 @@ TrafficGen::parseConfig()
                                  blocksize, page_size);
 
                         if (nbr_of_banks_util > nbr_of_banks_DRAM)
-                            fatal("Attempting to use more banks (%) than "
-                                  "what is available (%)\n",
-                                  nbr_of_banks_util, nbr_of_banks_DRAM);
-
-                        if (nbr_of_banks_util > nbr_of_banks_DRAM)
-                            fatal("Attempting to use more banks (%) than "
-                                  "what is available (%)\n",
+                            fatal("Attempting to use more banks (%d) than "
+                                  "what is available (%d)\n",
                                   nbr_of_banks_util, nbr_of_banks_DRAM);
 
                         // count the number of sequential packets to