summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorKumar Gala <kumar.gala@linaro.org>2017-01-27 14:38:39 -0600
committerAnas Nashif <nashif@linux.intel.com>2017-01-30 12:01:48 +0000
commitc9a4335ad31fe0ce653cf86e30dc508f01131623 (patch)
treee6f16efde5bd835f4fabad774c5df88aacf31d57 /samples
parentf086a195ce797b39ac3a779b687f9ff0afadeae8 (diff)
samples: zperf: cleanup types for constant arrays
There are a few arrays we use with print_number and parse_number. These functions expect a const uint32_t so lets have the arrays for TIME_US, KBPS, and K match. Change-Id: I6347b06af2374d702144084bb6b538a478fb8fac Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Diffstat (limited to 'samples')
-rw-r--r--samples/net/zperf/src/shell_utils.c6
-rw-r--r--samples/net/zperf/src/shell_utils.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/samples/net/zperf/src/shell_utils.c b/samples/net/zperf/src/shell_utils.c
index da24ab818..12740c444 100644
--- a/samples/net/zperf/src/shell_utils.c
+++ b/samples/net/zperf/src/shell_utils.c
@@ -14,11 +14,11 @@
#include "shell_utils.h"
-const int TIME_US[] = { 60 * 1000 * 1000, 1000 * 1000, 1000, 0 };
+const uint32_t TIME_US[] = { 60 * 1000 * 1000, 1000 * 1000, 1000, 0 };
const char *TIME_US_UNIT[] = { "m", "s", "ms", "us" };
-const int KBPS[] = { 1024, 0 };
+const uint32_t KBPS[] = { 1024, 0 };
const char *KBPS_UNIT[] = { "Mbps", "Kbps" };
-const int K[] = { 1024 * 1024, 1024, 0 };
+const uint32_t K[] = { 1024 * 1024, 1024, 0 };
const char *K_UNIT[] = { "M", "K", "" };
void print_number(uint32_t value, const uint32_t *divisor,
diff --git a/samples/net/zperf/src/shell_utils.h b/samples/net/zperf/src/shell_utils.h
index 86e7f0685..6116c2b19 100644
--- a/samples/net/zperf/src/shell_utils.h
+++ b/samples/net/zperf/src/shell_utils.h
@@ -9,11 +9,11 @@
#define IPV4_STR_LEN_MAX 15
#define IPV4_STR_LEN_MIN 7
-extern const int TIME_US[];
+extern const uint32_t TIME_US[];
extern const char *TIME_US_UNIT[];
-extern const int KBPS[];
+extern const uint32_t KBPS[];
extern const char *KBPS_UNIT[];
-extern const int K[];
+extern const uint32_t K[];
extern const char *K_UNIT[];
extern void print_number(uint32_t value, const uint32_t *divisor,