From b0af0177ac6d65315ddffd588e3e063f298270e1 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Tue, 16 Dec 2014 14:26:33 -0600 Subject: [PATCH] mpdu: Replace for loop with memcpy --- src/mpdu.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/mpdu.c b/src/mpdu.c index 1b9efc27..54c44ff9 100644 --- a/src/mpdu.c +++ b/src/mpdu.c @@ -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;