]> git.draconx.ca Git - cdecl99.git/commitdiff
libcdecl: Avoid using strcpy w/ empty strings.
authorNick Bowler <nbowler@draconx.ca>
Thu, 20 Jul 2023 01:15:14 +0000 (21:15 -0400)
committerNick Bowler <nbowler@draconx.ca>
Thu, 20 Jul 2023 01:15:14 +0000 (21:15 -0400)
The parser is currently using strcpy to copy constant empty strings; it
is just as easy to explicitly assign the single zero byte instead.

Since these are the only use of strcpy in the library, and for whatever
reason GCC is not optimizing out these strcpy calls, on ELF hosts this
saves a PLT entry in the shared library and everything associated with
that too.


No differences found