Move free_xbuf() into ifuncs.h.
authorWayne Davison <wayned@samba.org>
Sat, 24 Oct 2009 05:55:06 +0000 (22:55 -0700)
committerWayne Davison <wayned@samba.org>
Sat, 24 Oct 2009 05:55:06 +0000 (22:55 -0700)
ifuncs.h
io.c

index 8c128d5..656597e 100644 (file)
--- a/ifuncs.h
+++ b/ifuncs.h
@@ -35,6 +35,14 @@ realloc_xbuf(xbuf *xb, size_t sz)
        xb->size = sz;
 }
 
        xb->size = sz;
 }
 
+static inline void
+free_xbuf(xbuf *xb)
+{
+       if (xb->buf)
+               free(xb->buf);
+       memset(xb, 0, sizeof (xbuf));
+}
+
 static inline int
 to_wire_mode(mode_t mode)
 {
 static inline int
 to_wire_mode(mode_t mode)
 {
diff --git a/io.c b/io.c
index 3ece9c3..611b893 100644 (file)
--- a/io.c
+++ b/io.c
@@ -1153,13 +1153,6 @@ int io_start_buffering_in(int f_in)
        return 1;
 }
 
        return 1;
 }
 
-static void free_xbuf(xbuf *x)
-{
-       if (x->buf)
-               free(x->buf);
-       memset(x, 0, sizeof (xbuf));
-}
-
 void io_end_buffering_in(BOOL free_buffers)
 {
        if (DEBUG_GTE(IO, 2)) {
 void io_end_buffering_in(BOOL free_buffers)
 {
        if (DEBUG_GTE(IO, 2)) {