ifctrstat: Misc style fixes

This commit is contained in:
A. Wilcox 2020-08-14 10:17:01 -05:00
parent 05e0ac139b
commit 95d943ee44
No known key found for this signature in database
GPG key ID: CB29CB51922B9D14
2 changed files with 5 additions and 4 deletions

View file

@ -64,7 +64,7 @@ CPPFLAGS_${CONFIG_IFQUERY} += -DCONFIG_IFQUERY
# enable ifctrstat applet (+9 KB)
CONFIG_IFCTRSTAT ?= Y
IFCTRSTAT_SRC = cmd/ifctrstat.c cmd/ifctrstat_linux.c
IFCTRSTAT_SRC = cmd/ifctrstat.c cmd/ifctrstat-${LAYOUT}.c
MULTICALL_${CONFIG_IFCTRSTAT}_OBJ += ${IFCTRSTAT_SRC:.c=.o}
CMDS_${CONFIG_IFCTRSTAT} += ifctrstat
CPPFLAGS_${CONFIG_IFCTRSTAT} += -DCONFIG_IFCTRSTAT

View file

@ -1,6 +1,6 @@
/*
* cmd/ifctrstat_linux.c
* Purpose: Implement ifstats system-specific routines for Linux
* cmd/ifctrstat-linux.c
* Purpose: Implement ifctrstat system-specific routines for Linux
*
* Copyright (c) 2020 Adélie Software in the Public Benefit, Inc.
*
@ -15,6 +15,7 @@
#include <errno.h>
#include <stdio.h>
#include "multicall.h"
const char *avail_counters[] = {
"rx.octets",
@ -27,7 +28,7 @@ const char *avail_counters[] = {
"tx.errors"
};
size_t avail_counters_count = sizeof(avail_counters) / sizeof(*avail_counters);
size_t avail_counters_count = ARRAY_SIZE(avail_counters);
const char *
read_counter(const char *interface, const char *counter)