aboutsummaryrefslogtreecommitdiff
path: root/tools/tools/netmap/ctrs.h
diff options
context:
space:
mode:
authorVincenzo Maffione <vmaffione@FreeBSD.org>2020-10-03 13:19:48 +0000
committerVincenzo Maffione <vmaffione@FreeBSD.org>2020-10-03 13:19:48 +0000
commit7eb32dc8f003402de96c63dfe6609c57df74342f (patch)
treeca4edccc1f5585c9a1192ae845d31b98e9dad8bd /tools/tools/netmap/ctrs.h
parentf7265157586a1fa983fb959824d5e701dcf4e4b5 (diff)
downloadsrc-7eb32dc8f003402de96c63dfe6609c57df74342f.tar.gz
src-7eb32dc8f003402de96c63dfe6609c57df74342f.zip
netmap: tools: fix several compiler warnings
MFC after: 1 week
Notes
Notes: svn path=/head/; revision=366393
Diffstat (limited to 'tools/tools/netmap/ctrs.h')
-rw-r--r--tools/tools/netmap/ctrs.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/tools/netmap/ctrs.h b/tools/tools/netmap/ctrs.h
index a41ae6853fbf..eb4c4c9d4bfd 100644
--- a/tools/tools/netmap/ctrs.h
+++ b/tools/tools/netmap/ctrs.h
@@ -18,12 +18,12 @@ struct my_ctrs {
* Caller has to make sure that the buffer is large enough.
*/
static const char *
-norm2(char *buf, double val, char *fmt, int normalize)
+norm2(char *buf, double val, const char *fmt, int normalize)
{
- char *units[] = { "", "K", "M", "G", "T" };
+ const char *units[] = { "", "K", "M", "G", "T" };
u_int i;
if (normalize)
- for (i = 0; val >=1000 && i < sizeof(units)/sizeof(char *) - 1; i++)
+ for (i = 0; val >=1000 && i < sizeof(units)/sizeof(const char *) - 1; i++)
val /= 1000;
else
i=0;