]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - libratbox/include/rb_memory.h
autogen.sh is not necessary at this time, and did not work anyway.
[irc/rqf/shadowircd.git] / libratbox / include / rb_memory.h
index d8fa683768d60e1cd018f3cf20bf80516b52d3b8..d4dd6f0c2a47c9cb49688ccb220729f408259d0d 100644 (file)
@@ -21,7 +21,7 @@
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
  *  USA
  *
- *  $Id: rb_memory.h 25022 2008-01-23 03:54:00Z androsyn $
+ *  $Id: rb_memory.h 26092 2008-09-19 15:13:52Z androsyn $
  */
 
 #ifndef RB_LIB_H
@@ -40,7 +40,7 @@ static inline void *
 rb_malloc(size_t size)
 {
        void *ret = calloc(1, size);
-       if(unlikely(ret == NULL))
+       if(rb_unlikely(ret == NULL))
                rb_outofmemory();
        return (ret);
 }
@@ -50,7 +50,7 @@ rb_realloc(void *x, size_t y)
 {
        void *ret = realloc(x, y);
 
-       if(unlikely(ret == NULL))
+       if(rb_unlikely(ret == NULL))
                rb_outofmemory();
        return (ret);
 }
@@ -59,28 +59,28 @@ static inline char *
 rb_strndup(const char *x, size_t y)
 {
        char *ret = malloc(y);
-       if(unlikely(ret == NULL))
+       if(rb_unlikely(ret == NULL))
                rb_outofmemory();
        rb_strlcpy(ret, x, y);
-       return(ret);
+       return (ret);
 }
 
 static inline char *
 rb_strdup(const char *x)
 {
        char *ret = malloc(strlen(x) + 1);
-       if(unlikely(ret == NULL))
+       if(rb_unlikely(ret == NULL))
                rb_outofmemory();
        strcpy(ret, x);
-       return(ret);
+       return (ret);
 }
 
 
 static inline void
 rb_free(void *ptr)
 {
-        if(likely(ptr != NULL))
-               free(ptr);
+       if(rb_likely(ptr != NULL))
+               free(ptr);
 }
 
 #endif /* _I_MEMORY_H */