aboutsummaryrefslogtreecommitdiffstats
path: root/interface.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2000-04-04 04:28:28 +0000
committerEric S. Raymond <esr@thyrsus.com>2000-04-04 04:28:28 +0000
commit04817a8aa79e9e3e499e06aed9702ddb3a66e707 (patch)
tree16e8f9f32466868397e0242e8b364f4fd31d5c9e /interface.c
parent8efde63e2ab37c6179499202ecd6e83f9613166f (diff)
downloadfetchmail-04817a8aa79e9e3e499e06aed9702ddb3a66e707.tar.gz
fetchmail-04817a8aa79e9e3e499e06aed9702ddb3a66e707.tar.bz2
fetchmail-04817a8aa79e9e3e499e06aed9702ddb3a66e707.zip
fix pclose bug.
svn path=/trunk/; revision=2853
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c7
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);
}
}