diff options
author | Vincenzo Maffione <vmaffione@FreeBSD.org> | 2020-10-03 13:19:48 +0000 |
---|---|---|
committer | Vincenzo Maffione <vmaffione@FreeBSD.org> | 2020-10-03 13:19:48 +0000 |
commit | 7eb32dc8f003402de96c63dfe6609c57df74342f (patch) | |
tree | ca4edccc1f5585c9a1192ae845d31b98e9dad8bd /tools/tools/netmap/ctrs.h | |
parent | f7265157586a1fa983fb959824d5e701dcf4e4b5 (diff) | |
download | src-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.h | 6 |
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; |