mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-01-08 04:05:54 +00:00
quic: Use G_UNLIKELY in some hot paths
The buffers provided should be big enough to avoid to ask for more space much often. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
5a31a3850d
commit
34807c600c
@ -394,7 +394,7 @@ static void more_io_words(Encoder *encoder)
|
||||
|
||||
static inline void write_io_word(Encoder *encoder)
|
||||
{
|
||||
if (encoder->io_now == encoder->io_end) {
|
||||
if (G_UNLIKELY(encoder->io_now == encoder->io_end)) {
|
||||
more_io_words(encoder);
|
||||
}
|
||||
*(encoder->io_now++) = GUINT32_TO_LE(encoder->io_word);
|
||||
@ -442,7 +442,7 @@ static inline void flush(Encoder *encoder)
|
||||
|
||||
static inline void read_io_word(Encoder *encoder)
|
||||
{
|
||||
if (encoder->io_now == encoder->io_end) {
|
||||
if (G_UNLIKELY(encoder->io_now == encoder->io_end)) {
|
||||
more_io_words(encoder);
|
||||
}
|
||||
if (spice_extra_checks) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user