From 43da20f970c4a3a3a22a78d793897fdf4bf2ed1f Mon Sep 17 00:00:00 2001 From: delphij Date: Thu, 25 May 2006 04:01:04 +0000 Subject: - Add include for libutil.h and string.h for prototype. - Cast the rvalue to be compared with the result of strlen() to size_t. --- lib/libutil/kld.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/libutil/kld.c b/lib/libutil/kld.c index b8aa9ef..bc80640 100644 --- a/lib/libutil/kld.c +++ b/lib/libutil/kld.c @@ -32,6 +32,8 @@ #include #include +#include +#include int kld_isloaded(const char *name) @@ -50,7 +52,7 @@ kld_isloaded(const char *name) return (1); /* strip .ko and try again */ if ((ko = strstr(fstat.name, ".ko")) != NULL && - strlen(name) == ko - fstat.name && + strlen(name) == (size_t)(ko - fstat.name) && strncmp(fstat.name, name, ko - fstat.name) == 0) return (1); /* look for a matching module within the file */ -- cgit v1.1