mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-01 17:37:39 +00:00
Fix stdlib usage
This commit is contained in:
parent
80da805688
commit
76f28ea120
4 changed files with 9 additions and 9 deletions
|
@ -283,7 +283,7 @@ static uint32_t param_clear(struct spa_list *param_list, uint32_t id)
|
|||
spa_list_for_each_safe(p, t, param_list, link) {
|
||||
if (id == SPA_ID_INVALID || p->id == id) {
|
||||
spa_list_remove(&p->link);
|
||||
free(p);
|
||||
free(p); // This should NOT be SDL_free()
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
@ -317,7 +317,7 @@ static struct param *param_add(struct spa_list *params,
|
|||
p->seq = seq;
|
||||
if (param != NULL) {
|
||||
p->param = SPA_PTROFF(p, sizeof(*p), struct spa_pod);
|
||||
memcpy(p->param, param, SPA_POD_SIZE(param));
|
||||
SDL_memcpy(p->param, param, SPA_POD_SIZE(param));
|
||||
} else {
|
||||
param_clear(params, id);
|
||||
p->param = NULL;
|
||||
|
@ -339,7 +339,7 @@ static void param_update(struct spa_list *param_list, struct spa_list *pending_l
|
|||
p->seq != SPA_PARAMS_INFO_SEQ(params[i]) &&
|
||||
p->param != NULL) {
|
||||
spa_list_remove(&p->link);
|
||||
free(p);
|
||||
free(p); // This should NOT be SDL_free()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -347,7 +347,7 @@ static void param_update(struct spa_list *param_list, struct spa_list *pending_l
|
|||
spa_list_remove(&p->link);
|
||||
if (p->param == NULL) {
|
||||
param_clear(param_list, p->id);
|
||||
free(p);
|
||||
free(p); // This should NOT be SDL_free()
|
||||
} else {
|
||||
spa_list_append(param_list, &p->link);
|
||||
}
|
||||
|
@ -840,7 +840,7 @@ static void proxy_destroy(void *data)
|
|||
}
|
||||
param_clear(&g->param_list, SPA_ID_INVALID);
|
||||
param_clear(&g->pending_list, SPA_ID_INVALID);
|
||||
free(g->name);
|
||||
free(g->name); // This should NOT be SDL_free()
|
||||
}
|
||||
|
||||
static const struct pw_proxy_events proxy_events = {
|
||||
|
|
|
@ -1526,7 +1526,7 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(nativeSetenv)(
|
|||
|
||||
// This is only called at startup, to initialize the environment
|
||||
// Note that we call setenv() directly to avoid affecting SDL environments
|
||||
setenv(utfname, utfvalue, 1);
|
||||
setenv(utfname, utfvalue, 1); // This should NOT be SDL_setenv()
|
||||
|
||||
(*env)->ReleaseStringUTFChars(env, name, utfname);
|
||||
(*env)->ReleaseStringUTFChars(env, value, utfvalue);
|
||||
|
|
|
@ -300,7 +300,7 @@
|
|||
". [SDL] In performDragOperation, desiredType '%s', "
|
||||
"Submitting DropText as (%lu) '%s'\n",
|
||||
[[desiredType description] UTF8String],
|
||||
strlen(token), token);
|
||||
SDL_strlen(token), token);
|
||||
if (!SDL_SendDropText(sdlwindow, token)) {
|
||||
SDL_free(buffer);
|
||||
return NO;
|
||||
|
|
|
@ -255,7 +255,7 @@ bool HAIKU_GetDisplayModes(SDL_VideoDevice *_this, SDL_VideoDisplay *display)
|
|||
SDL_AddFullscreenDisplayMode(display, &mode);
|
||||
}
|
||||
}
|
||||
free(bmodes); // This should not be SDL_free()
|
||||
free(bmodes); // This should NOT be SDL_free()
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -289,7 +289,7 @@ bool HAIKU_SetDisplayMode(SDL_VideoDevice *_this, SDL_VideoDisplay *display, SDL
|
|||
return SDL_SetError("Bad video mode");
|
||||
}
|
||||
|
||||
free(bmode_list); // This should not be SDL_free()
|
||||
free(bmode_list); // This should NOT be SDL_free()
|
||||
|
||||
#ifdef SDL_VIDEO_OPENGL
|
||||
/* FIXME: Is there some way to reboot the OpenGL context? This doesn't
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue