From e5f5e72c77dfa5bf4dcaf4b52c5dc42981abb631 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 31 Jan 2005 15:12:39 +0000 Subject: [PATCH] A minor optimization. --- lib/gbuf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gbuf.h b/lib/gbuf.h index 519a7c0f..0775f20c 100644 --- a/lib/gbuf.h +++ b/lib/gbuf.h @@ -49,7 +49,7 @@ GBUF_PREFIX(realloc)(BUF_T *b, uns len) static inline void GBUF_PREFIX(grow)(BUF_T *b, uns len) { - if (len <= b->len) + if (likely(len <= b->len)) return; if (len < 2*b->len) // to ensure logarithmic cost len = 2*b->len; -- 2.39.5