mpdu: Replace for loop with memcpy

This commit is contained in:
Denis Kenzior 2014-12-16 14:26:33 -06:00
parent 61a44dd485
commit b0af0177ac
1 changed files with 1 additions and 5 deletions

View File

@ -55,14 +55,10 @@ static inline bool next_2bytes(const unsigned char *mpdu, int len,
static inline bool next_data(const unsigned char *mpdu, int len,
int *offset, unsigned char *holder, int t_len)
{
int i;
if (len < *offset + t_len)
return false;
for (i = 0; i < t_len; i++)
holder[i] = mpdu[*offset + i];
memcpy(holder, mpdu + *offset, t_len);
*offset += t_len;
return true;