diff options
author | Simon Ser <contact@emersion.fr> | 2022-05-11 17:18:39 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-05-11 11:47:49 -0400 |
commit | 1e9be019b2af7ad4aca66ba6460f56453829485d (patch) | |
tree | cb57946ad417d2ce7f59349f5a0ba81aecd989a8 /sway/commands/move.c | |
parent | 7cfa1507881144445efd9752e18219dd5ec4a14b (diff) |
Replace strncpy with memcpy
strncpy is useless here, is dangerous because it doesn't guarantee
that the string is NUL-terminated and causes the following warning:
../sway/criteria.c: In function ‘criteria_parse’:
../sway/criteria.c:712:25: error: ‘strncpy’ destination unchanged after copying no bytes [-Werror=stringop-truncation]
712 | strncpy(value, valuestart, head - valuestart);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Diffstat (limited to 'sway/commands/move.c')
0 files changed, 0 insertions, 0 deletions