]> mj.ucw.cz Git - libucw.git/commitdiff
A minor optimization.
authorMartin Mares <mj@ucw.cz>
Mon, 31 Jan 2005 15:12:39 +0000 (15:12 +0000)
committerMartin Mares <mj@ucw.cz>
Mon, 31 Jan 2005 15:12:39 +0000 (15:12 +0000)
lib/gbuf.h

index 519a7c0fe2eb515e8c05c9e864dad6f0bb051dfb..0775f20cb3738bb976176a72af94918322261f9d 100644 (file)
@@ -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;