aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/freebsd/spl/callb.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/os/freebsd/spl/callb.c')
-rw-r--r--module/os/freebsd/spl/callb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/module/os/freebsd/spl/callb.c b/module/os/freebsd/spl/callb.c
index ba13ea887..47f3ccc0c 100644
--- a/module/os/freebsd/spl/callb.c
+++ b/module/os/freebsd/spl/callb.c
@@ -160,8 +160,7 @@ callb_add_common(boolean_t (*func)(void *arg, int code),
"too long -- truncated to %d chars",
name, CB_MAXNAME);
#endif
- (void) strncpy(cp->c_name, name, CB_MAXNAME);
- cp->c_name[CB_MAXNAME] = '\0';
+ (void) strlcpy(cp->c_name, name, sizeof (cp->c_name));
/*
* Insert the new callb at the head of its class list.