comparison buffer.c @ 1256:506f7681d0f8 coverity

merge up to date
author Matt Johnston <matt@ucc.asn.au>
date Tue, 15 Mar 2016 22:45:43 +0800
parents 2bb4c662d1c2
children 6914eedb1072
comparison
equal deleted inserted replaced
1219:84cf9062718d 1256:506f7681d0f8
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 */