summaryrefslogtreecommitdiff
path: root/ifpps.c
diff options
context:
space:
mode:
Diffstat (limited to 'ifpps.c')
-rw-r--r--ifpps.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ifpps.c b/ifpps.c
index 6c0387b..6f50bed 100644
--- a/ifpps.c
+++ b/ifpps.c
@@ -273,13 +273,13 @@ static int stats_proc_interrupts(char *ifname, struct ifstat *stats)
struct ethtool_drvinfo drvinf;
FILE *fp;
- fp = fopen("/proc/interrupts", "r");
- if (!fp)
- panic("Cannot open /proc/interrupts!\n");
-
cpus = get_number_cpus();
buff_len = cpus * 128;
buff = xmalloc(buff_len);
+
+ fp = fopen("/proc/interrupts", "r");
+ if (!fp)
+ panic("Cannot open /proc/interrupts!\n");
retry:
fseek(fp, 0, SEEK_SET);
memset(buff, 0, buff_len);