Skip to content

Commit

Permalink
Fix usage of sizeof() in test/testgles*.c files
Browse files Browse the repository at this point in the history
  • Loading branch information
1bsyl committed Nov 17, 2022
1 parent 89572af commit 71f2864
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/testgles.c
Expand Up @@ -173,7 +173,7 @@ main(int argc, char *argv[])
quit(2);
}

context = (SDL_GLContext *)SDL_calloc(state->num_windows, sizeof(context));
context = (SDL_GLContext *)SDL_calloc(state->num_windows, sizeof(*context));
if (context == NULL) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!\n");
quit(2);
Expand Down
2 changes: 1 addition & 1 deletion test/testgles2.c
Expand Up @@ -614,7 +614,7 @@ main(int argc, char *argv[])
return 0;
}

context = (SDL_GLContext *)SDL_calloc(state->num_windows, sizeof(context));
context = (SDL_GLContext *)SDL_calloc(state->num_windows, sizeof(*context));
if (context == NULL) {
SDL_Log("Out of memory!\n");
quit(2);
Expand Down
2 changes: 1 addition & 1 deletion test/testgles2_sdf.c
Expand Up @@ -522,7 +522,7 @@ main(int argc, char *argv[])
return 0;
}

context = (SDL_GLContext *)SDL_calloc(state->num_windows, sizeof(context));
context = (SDL_GLContext *)SDL_calloc(state->num_windows, sizeof(*context));
if (context == NULL) {
SDL_Log("Out of memory!\n");
quit(2);
Expand Down

0 comments on commit 71f2864

Please sign in to comment.