From deb8a3b7c9bc0384152d3d9a23c4dd2db1049155 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Tue, 15 Jan 2002 23:47:56 +0000 Subject: [PATCH] Fix function typecasts. --- lib/device/dev-cache.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c index ca1f1d56c..a87042738 100644 --- a/lib/device/dev-cache.c +++ b/lib/device/dev-cache.c @@ -298,17 +298,15 @@ int dev_cache_init(void) return 0; } -iterate_fn _check_closed(void *data) +void _check_closed(struct device *dev) { - struct device *dev = (struct device *) data; - if (dev->fd >= 0) log_err("Device '%s' has been left open.", dev_name(dev)); } static inline void _check_for_open_devices(void) { - hash_iterate(_cache.names, _check_closed); + hash_iterate(_cache.names, (iterate_fn)_check_closed); } void dev_cache_exit(void)