Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed the buffer-has-space check in write_buf().
[rsync/rsync.git]
/
ifuncs.h
diff --git
a/ifuncs.h
b/ifuncs.h
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)
{