projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
simplifications.
[apps/madmutt.git]
/
lib-lib
/
buffer.h
diff --git
a/lib-lib/buffer.h
b/lib-lib/buffer.h
index
9e919b7
..
dd9d936
100644
(file)
--- a/
lib-lib/buffer.h
+++ b/
lib-lib/buffer.h
@@
-87,8
+87,10
@@
static inline void buffer_addch(buffer_t *buf, int c) {
}
static inline void buffer_reset(buffer_t *buf) {
- buf->len = 0;
- buf->data[0] = '\0';
+ if (buf->len) {
+ buf->len = 0;
+ buf->data[0] = '\0';
+ }
}