summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ifpps.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ifpps.c b/ifpps.c
index 785a882..0d13b08 100644
--- a/ifpps.c
+++ b/ifpps.c
@@ -233,9 +233,9 @@ static int stats_proc_net_dev(const char *ifname, struct ifstat *stats)
if (!fp)
panic("Cannot open /proc/net/dev!\n");
- ifname_colon = xstrndup(ifname, strlen(ifname)+2);
+ ifname_colon = xstrndup(ifname, strlen(ifname) + 2);
ifname_colon[strlen(ifname)] = ':';
- ifname_colon[strlen(ifname)+1] = '\0';
+ ifname_colon[strlen(ifname) + 1] = '\0';
if (fgets(buff, sizeof(buff), fp)) { ; }
if (fgets(buff, sizeof(buff), fp)) { ; }
@@ -243,7 +243,7 @@ static int stats_proc_net_dev(const char *ifname, struct ifstat *stats)
memset(buff, 0, sizeof(buff));
while (fgets(buff, sizeof(buff), fp) != NULL) {
- buff[sizeof(buff) -1] = 0;
+ buff[sizeof(buff) - 1] = 0;
if (strstr(buff, ifname_colon) == NULL)
continue;
@@ -362,7 +362,9 @@ static int stats_proc_softirqs(struct ifstat *stats)
else
continue;
- for (ptr += strlen("NET_xX:"), i = 0; i < cpus; ++i) {
+ ptr += strlen("NET_xX:");
+
+ for (i = 0; i < cpus; ++i) {
switch (net_type) {
case softirqs_net_tx:
stats->irqs_stx[i] = strtol(ptr, &ptr, 10);