Remove unnecessary and extra zero length check in mem functions' macro (#2428)
In macro bh_memcpy_s, bh_memcy_wa and bh_memmove_s, no need to do extra check for length is zero or not because it was already done inside of the functions called.
This commit is contained in:
committed by
GitHub
parent
ebd9466d57
commit
81fbfbfcc0
@ -31,6 +31,10 @@ b_memcpy_wa(void *s1, unsigned int s1max, const void *s2, unsigned int n)
|
||||
unsigned int *p;
|
||||
char *ps;
|
||||
|
||||
if (n == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (pa > src) {
|
||||
pa -= 4;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user