Code style: changed "sizeof foo" to "sizeof(foo)" (thanks @sezero!)

(cherry picked from commit c6443d86c9)
This commit is contained in:
Sam Lantinga committed 2023-03-09 15:23:59 -08:00
1 parent 46d143376a
commit 0d76380042
71 files changed
+525 -234

No files matched your search

+4 -4
View File
@@ -159,7 +159,7 @@ static int CPU_haveCPUID(void)
: "%eax", "%ecx"
);
#elif (defined(__GNUC__) || defined(__llvm__)) && defined(__x86_64__)
/* Technically, if this is being compiled under __x86_64__ then it has
/* Technically, if this is being compiled under __x86_64__ then it has
CPUid by definition. But it's nice to be able to prove it. :) */
__asm__ (
" pushfq # Get original EFLAGS \n"
@@ -386,7 +386,7 @@ static int CPU_haveARMSIMD(void)
fd = open("/proc/self/auxv", O_RDONLY | O_CLOEXEC);
if (fd >= 0) {
Elf32_auxv_t aux;
while (read(fd, &aux, sizeof aux) == sizeof aux) {
while (read(fd, &aux, sizeof(aux)) == sizeof(aux)) {
if (aux.a_type == AT_PLATFORM) {
const char *plat = (const char *)aux.a_un.a_val;
if (plat) {
@@ -1173,7 +1173,7 @@ SDL_SIMDAlloc(const size_t len)
Uint8 *ptr;
size_t to_allocate;
/* alignment + padding + sizeof (void *) is bounded (a few hundred
/* alignment + padding + sizeof(void *) is bounded (a few hundred
* bytes max), so no need to check for overflow within that argument */
if (SDL_size_add_overflow(len, alignment + padding + sizeof(void *), &to_allocate)) {
return NULL;
@@ -1200,7 +1200,7 @@ SDL_SIMDRealloc(void *mem, const size_t len)
Uint8 *ptr;
size_t to_allocate;
/* alignment + padding + sizeof (void *) is bounded (a few hundred
/* alignment + padding + sizeof(void *) is bounded (a few hundred
* bytes max), so no need to check for overflow within that argument */
if (SDL_size_add_overflow(len, alignment + padding + sizeof(void *), &to_allocate)) {
return NULL;