git: 6aee78551801 - stable/13 - rpc.lockd: Use libc strnlen() instead of reimplementing it
Mark Johnston
markj at FreeBSD.org
Wed Jun 30 12:18:18 UTC 2021
The branch stable/13 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=6aee785518019fbadef7b6ac50c6c9037d4e6b03
commit 6aee785518019fbadef7b6ac50c6c9037d4e6b03
Author: Mark Johnston <markj at FreeBSD.org>
AuthorDate: 2021-06-23 14:06:57 +0000
Commit: Mark Johnston <markj at FreeBSD.org>
CommitDate: 2021-06-30 12:18:09 +0000
rpc.lockd: Use libc strnlen() instead of reimplementing it
No functional change intended.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 2bbeada0f75a78c24ef9eaeb97c24a672425791d)
---
usr.sbin/rpc.lockd/lockd_lock.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/usr.sbin/rpc.lockd/lockd_lock.c b/usr.sbin/rpc.lockd/lockd_lock.c
index 25e74ed6a7de..1fc4ce23597a 100644
--- a/usr.sbin/rpc.lockd/lockd_lock.c
+++ b/usr.sbin/rpc.lockd/lockd_lock.c
@@ -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
*/
More information about the dev-commits-src-all
mailing list