rpc.lockd: Use libc strnlen() instead of reimplementing it

No functional change intended.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Mark Johnston 2021-06-23 10:06:57 -04:00
parent 17ac6d94db
commit 2bbeada0f7

View File

@ -217,7 +217,6 @@ enum nlm_stats do_test(struct file_lock *fl,
enum nlm_stats do_unlock(struct file_lock *fl);
enum nlm_stats do_lock(struct file_lock *fl);
void do_clear(const char *hostname);
size_t strnlen(const char *, size_t);
void
debuglog(char const *fmt, ...)
@ -373,17 +372,6 @@ copy_nlm4_lock_to_nlm4_holder(src, exclusive, dest)
dest->l_len = src->l_len;
}
size_t
strnlen(const char *s, size_t len)
{
size_t n;
for (n = 0; s[n] != 0 && n < len; n++)
;
return n;
}
/*
* allocate_file_lock: Create a lock with the given parameters
*/