mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-18 17:14:41 -04:00
[misc] use the more univerasal _mm_alloc() instead of _aligned_malloc()
* Also ensure that our buffers are aligned * Also remove the use of static buffers in ms-sys
This commit is contained in:
parent
3fdf622933
commit
e76f60a3e8
11 changed files with 125 additions and 113 deletions
|
@ -94,6 +94,7 @@
|
|||
#define CHECK_FOR_USER_CANCEL if (IS_ERROR(FormatStatus)) goto out
|
||||
|
||||
#define safe_free(p) do {free((void*)p); p = NULL;} while(0)
|
||||
#define safe_mm_free(p) do {_mm_free((void*)p); p = NULL;} while(0)
|
||||
#define safe_min(a, b) min((size_t)(a), (size_t)(b))
|
||||
#define safe_strcp(dst, dst_max, src, count) do {memcpy(dst, src, safe_min(count, dst_max)); \
|
||||
((char*)dst)[safe_min(count, dst_max)-1] = 0;} while(0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue