Refactored memcopy range check.
This commit is contained in:
@@ -33,14 +33,16 @@
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* copy len bytes from src to offset of dest if there is enough space. */
|
||||
/* returns 0 if there is not enough space, or the number of bytes copied. */
|
||||
bool memcopylen(
|
||||
size_t offset,
|
||||
size_t max,
|
||||
size_t len);
|
||||
size_t memcopy(
|
||||
void *dest,
|
||||
void *src,
|
||||
size_t offset, /* where in dest to put the data */
|
||||
size_t len, /* amount of data to copy */
|
||||
size_t max); /* total size of destination */
|
||||
size_t offset,
|
||||
size_t len,
|
||||
size_t max);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user