]> granicus.if.org Git - graphviz/commit
excast: avoid sfprintf in integer-to-string
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 24 Jul 2021 03:15:53 +0000 (20:15 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 4 Aug 2021 02:02:51 +0000 (19:02 -0700)
commitb336334b43656b06a34943ed1ae0ef08fb8a8934
tree3c46928812b5aab18a9dbda5b68f6c17fd8114c2
parent1bdda463f6a4160de5e62d28b26995f5e4253c27
excast: avoid sfprintf in integer-to-string

Instead of constructing a string in the `tmp` buffer and then eventually
allocating vmalloc space to copy this into, we can simply compute the number of
bytes in advance, allocate vmalloc space, and then directly emit the output into
the vmalloc buffer. Related to #1873, #1998.
lib/expr/exgram.h