]> granicus.if.org Git - graphviz/commit
jpeg_size: remove abuse of 'strchr' to search a byte array
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 17 Nov 2021 03:09:22 +0000 (19:09 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 21 Nov 2021 01:09:14 +0000 (17:09 -0800)
commit554f06fdbe5cf24359040bc2eeb345148517aa8f
tree27a40983a8065b8833ad6f4076f13fec8eb98924
parent539ed6b03ab31515b7affce0a784079f1b1bedec
jpeg_size: remove abuse of 'strchr' to search a byte array

Using `memchr` instead avoids the need to cast the array, shrinks the array
itself by avoiding the need for a NUL terminator, and makes it more obvious to
the compiler it can inline and unroll the whole thing.
lib/gvc/gvusershape.c