diff options
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/interface.c b/interface.c index 7ba922f9..e52db466 100644 --- a/interface.c +++ b/interface.c @@ -81,12 +81,11 @@ void interface_init(void) { int major, minor; - if (fscanf(fp, "%d.%d.%*d", &major, &minor) != 2) - return; - - if (major >= 2 && minor >= 2) + if (fscanf(fp, "%d.%d.%*d", &major, &minor) >= 2 + && major >= 2 && minor >= 2) /* Linux 2.2 -- transmit packet count in 10th field */ netdevfmt = "%d %d %*d %*d %*d %d %*d %*d %*d %d %*d %*d %d"; + pclose(fp); } } |