mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-08 01:13:16 +00:00
size_t values can't be negative.
This commit is contained in:
parent
1523a4f035
commit
28ceecba37
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue