From 04817a8aa79e9e3e499e06aed9702ddb3a66e707 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 4 Apr 2000 04:28:28 +0000 Subject: fix pclose bug. svn path=/trunk/; revision=2853 --- interface.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'interface.c') 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); } } -- cgit v1.2.3