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) # enable ifctrstat applet (+9 KB)
CONFIG_IFCTRSTAT ?= Y 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} MULTICALL_${CONFIG_IFCTRSTAT}_OBJ += ${IFCTRSTAT_SRC:.c=.o}
CMDS_${CONFIG_IFCTRSTAT} += ifctrstat CMDS_${CONFIG_IFCTRSTAT} += ifctrstat
CPPFLAGS_${CONFIG_IFCTRSTAT} += -DCONFIG_IFCTRSTAT CPPFLAGS_${CONFIG_IFCTRSTAT} += -DCONFIG_IFCTRSTAT

View file

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