size_t values can't be negative.

This commit is contained in:
Frank Denis 2013-05-20 10:40:44 -07:00
parent 1523a4f035
commit 28ceecba37

View File

@ -115,9 +115,6 @@ readlong(char *packet, char **src, uint32_t *dst)
int int
readdata(char *packet, char **src, char *dst, size_t len) readdata(char *packet, char **src, char *dst, size_t len)
{ {
if (len < 0)
return 0;
memcpy(dst, *src, len); memcpy(dst, *src, len);
(*src) += len; (*src) += len;
@ -232,9 +229,6 @@ putlong(char **dst, uint32_t value)
int int
putdata(char **dst, char *data, size_t len) putdata(char **dst, char *data, size_t len)
{ {
if (len < 0)
return 0;
memcpy(*dst, data, len); memcpy(*dst, data, len);
(*dst) += len; (*dst) += len;