aboutsummaryrefslogtreecommitdiff
path: root/tools/tools/netmap/ctrs.h
diff options
context:
space:
mode:
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;