> // Change all the ' --' strings to '~--' so that
> // they can be identified as tokens.
> while ((conflist = strstr(str, " --")) != NULL) {
> -strncpy(conflist, "~--", 3);
> +conflist[0] = '~';
> }
Doesn't this simply replace -- with ~- ?
The comment seems wro
Only one character is actually rewritten.
Fixes truncation warnings, such as
warning: ‘strncpy’ output truncated before terminating nul copying 3 bytes from
a string of the same length [-Wstringop-truncation]
in gcc 10.2.0
---
fftools/cmdutils.c | 4 ++--
1 file changed, 2 insertions(+), 2 delet