dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
gedcom-parse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
462b119
)
Clear the buffer at init.
author
Peter Verthez
<Peter.Verthez@advalvas.be>
Sun, 8 Dec 2002 13:14:44 +0000
(13:14 +0000)
committer
Peter Verthez
<Peter.Verthez@advalvas.be>
Sun, 8 Dec 2002 13:14:44 +0000
(13:14 +0000)
gedcom/buffer.c
patch
|
blob
|
history
diff --git
a/gedcom/buffer.c
b/gedcom/buffer.c
index 6f807b1dc0454083045e7e4be65c027e4e281e40..8873529996a66cf7cee5d92fe0a355d03f0028a1 100644
(file)
--- a/
gedcom/buffer.c
+++ b/
gedcom/buffer.c
@@
-51,8
+51,8
@@
void init_buffer(struct safe_buffer *b)
if (b && b->buffer == NULL) {
b->buffer = (char *)malloc(INITIAL_BUF_SIZE);
if (b->buffer) {
- b->buffer[0] = '\0';
b->bufsize = INITIAL_BUF_SIZE;
+ memset(b->buffer, 0, b->bufsize);
b->buf_end = b->buffer;
b->buflen = 0;
if (b->cleanup_func && atexit(b->cleanup_func) != 0) {