From: Martin Mares Date: Mon, 31 Jan 2005 15:12:39 +0000 (+0000) Subject: A minor optimization. X-Git-Tag: holmes-import~835 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=e5f5e72c77dfa5bf4dcaf4b52c5dc42981abb631;p=libucw.git A minor optimization. --- 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;