aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-07-31 16:41:28 -0700
committerEric Anholt <[email protected]>2018-07-31 16:42:11 -0700
commite6ff5ac4468eb144eb8809997c696009d4a1eaae (patch)
tree889da23f951cd1897a61e705d6634600643ef462 /src
parent3471ce99850cd2ebfe04a10d01f5fe69a349594f (diff)
v3d: use snprintf(..., "%s", ...) instead of strncpy
Fixes a compiler warning about terminator NUL, based on f836d799f906 ("intel/decoder: use snprintf(..., "%s", ...) instead of strncpy")
Diffstat (limited to 'src')
-rw-r--r--src/broadcom/cle/v3d_decoder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/broadcom/cle/v3d_decoder.c b/src/broadcom/cle/v3d_decoder.c
index 00d67b2a2e6..4496388e319 100644
--- a/src/broadcom/cle/v3d_decoder.c
+++ b/src/broadcom/cle/v3d_decoder.c
@@ -834,7 +834,7 @@ iter_advance_field(struct v3d_field_iterator *iter)
iter->field = iter->group->fields[iter->field_iter++];
if (iter->field->name)
- strncpy(iter->name, iter->field->name, sizeof(iter->name));
+ snprintf(iter->name, sizeof(iter->name), iter->field->name);
else
memset(iter->name, 0, sizeof(iter->name));
iter->offset = iter_group_offset_bits(iter, iter->group_iter) / 8 +