3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 14:49:24 +01:00

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

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;