diff options
author | Xin LI <delphij@FreeBSD.org> | 2020-07-26 01:45:26 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2020-07-26 01:45:26 +0000 |
commit | 7201590bbf94e0abe5550a203021bfc802612401 (patch) | |
tree | b34f583b12df4934cf459b05a229a43e083dd30e /sys/geom/geom_ccd.c | |
parent | 795c5f365e38fe109e6611461dcc032a4a1134b8 (diff) |
Use snprintf instead of sprintf.
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=363540
Diffstat (limited to 'sys/geom/geom_ccd.c')
-rw-r--r-- | sys/geom/geom_ccd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c index f0a3fad02489..f7b580fa65f3 100644 --- a/sys/geom/geom_ccd.c +++ b/sys/geom/geom_ccd.c @@ -771,7 +771,7 @@ g_ccd_create(struct gctl_req *req, struct g_class *mp) /* Check all providers are valid */ for (i = 0; i < *nprovider; i++) { - sprintf(buf, "provider%d", i); + snprintf(buf, sizeof(buf), "provider%d", i); pp = gctl_get_provider(req, buf); if (pp == NULL) return; @@ -788,7 +788,7 @@ g_ccd_create(struct gctl_req *req, struct g_class *mp) /* Create consumers and attach to all providers */ for (i = 0; i < *nprovider; i++) { - sprintf(buf, "provider%d", i); + snprintf(buf, sizeof(buf), "provider%d", i); pp = gctl_get_provider(req, buf); cp = g_new_consumer(gp); error = g_attach(cp, pp); |