summaryrefslogtreecommitdiff
path: root/cpukit/libmisc/monitor/mon-editor.c
diff options
context:
space:
mode:
authorFrank Kühndel <frank.kuehndel@embedded-brains.de>2020-10-05 16:23:01 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-10-12 08:43:32 +0200
commit4763ef8d9b3d80599b8ac9f1f4a4c613f087c0e0 (patch)
treed4ae9aab5317c372b53f7639b5fe6982b6f0dc4f /cpukit/libmisc/monitor/mon-editor.c
parentb434dc1874b928eb879f77ac0fb2541659cd4d0b (diff)
psxndbm01 - Fixing string truncation warning
This fixes the following compiler warning: testsuites/psxtests/psxndbm01/init.c:221:3: warning: 'strncpy' output truncated before terminating nul copying 5 bytes from a string of the same length 221 | strncpy( test_strings, "Hello", 5 ); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In addition, the comments from Sebastian Huber on an old version of such a patch have been taken into account: 1) The use of `sizeof()` in `key.dsize = sizeof( test_strings );` is wrong. 2) There is no need to allocate the string. One can simply use a string constant. (See https://lists.rtems.org/pipermail/devel/2020-August/061418.html)
Diffstat (limited to 'cpukit/libmisc/monitor/mon-editor.c')
0 files changed, 0 insertions, 0 deletions