diff options
author | Guenter Roeck <[email protected]> | 2018-07-01 13:57:06 -0700 |
---|---|---|
committer | Jaegeuk Kim <[email protected]> | 2018-07-28 18:26:08 -0700 |
commit | b1385478187a90d4273c328aa8dcad8d47c350a2 (patch) | |
tree | 1da1110a19fa68d81cee479a830cba13750a22e8 /scripts/dtc/treesource.c | |
parent | 2d3a58566f66465bbcd70afafbb66b001beb9d12 (diff) |
f2fs: Replace strncpy with memcpy
gcc 8.1.0 complains:
fs/f2fs/namei.c: In function 'f2fs_update_extension_list':
fs/f2fs/namei.c:257:3: warning:
'strncpy' output truncated before terminating nul copying
as many bytes from a string as its length
fs/f2fs/namei.c:249:3: warning:
'strncpy' output truncated before terminating nul copying
as many bytes from a string as its length
Using strncpy() is indeed less than perfect since the length of data to
be copied has already been determined with strlen(). Replace strncpy()
with memcpy() to address the warning and optimize the code a little.
Signed-off-by: Guenter Roeck <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
Diffstat (limited to 'scripts/dtc/treesource.c')
0 files changed, 0 insertions, 0 deletions