Special buffer initializer
authorPierre Habouzit <madcoder@debian.org>
Wed, 29 Aug 2007 16:51:02 +0000 (18:51 +0200)
committerPierre Habouzit <madcoder@debian.org>
Wed, 29 Aug 2007 16:51:02 +0000 (18:51 +0200)
buffer.h

index d58ab17..60c6f29 100644 (file)
--- a/buffer.h
+++ b/buffer.h
@@ -45,6 +45,8 @@ typedef struct buffer_t {
     ssize_t size;
 } buffer_t;
 
+#define BUFFER_INIT {NULL, 0, 0}
+
 DO_INIT(buffer_t, buffer);
 static inline void buffer_wipe(buffer_t *buf) {
     p_delete(&buf->data);