comparison buffer.c @ 1252:3f4af834314d

Merge branch 'fperrad-20151231_indent'
author Matt Johnston <matt@ucc.asn.au>
date Tue, 15 Mar 2016 21:41:22 +0800
parents 2bb4c662d1c2
children 6914eedb1072
comparison
equal deleted inserted replaced
1248:739b3909c499 1252:3f4af834314d
96 buffer* ret; 96 buffer* ret;
97 97
98 ret = buf_new(buf->len); 98 ret = buf_new(buf->len);
99 ret->len = buf->len; 99 ret->len = buf->len;
100 if (buf->len > 0) { 100 if (buf->len > 0) {
101 memcpy(ret->data, buf->data, buf->len); 101 memcpy(ret->data, buf->data, buf->len);
102 } 102 }
103 return ret; 103 return ret;
104 } 104 }
105 105
106 /* Set the length of the buffer */ 106 /* Set the length of the buffer */