Fix usage of sizeof() in test/testgles*.c files
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
diff --git a/test/testgles.c b/test/testgles.c
index cb989f4..745cf89 100644
--- a/test/testgles.c
+++ b/test/testgles.c
@@ -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);
diff --git a/test/testgles2.c b/test/testgles2.c
index 721c24b..903f7a8 100644
--- a/test/testgles2.c
+++ b/test/testgles2.c
@@ -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);
diff --git a/test/testgles2_sdf.c b/test/testgles2_sdf.c
index 064b6bc..e9e79d6 100644
--- a/test/testgles2_sdf.c
+++ b/test/testgles2_sdf.c
@@ -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);