mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-05 01:16:26 +00:00
remove most of SDL_OutOfMemory() calls where SDL is the allocator.
Since commit 447b508a77
, SDL_malloc,
SDL_calloc, and SDL_realloc already calls SDL_OutOfMemory().
This commit is contained in:
@@ -86,7 +86,6 @@ static void DBus_AppendFilter(SDL_DBusContext *dbus, DBusMessageIter *parent, co
|
||||
|
||||
patterns = SDL_strdup(filter->pattern);
|
||||
if (!patterns) {
|
||||
SDL_OutOfMemory();
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@@ -99,7 +98,6 @@ static void DBus_AppendFilter(SDL_DBusContext *dbus, DBusMessageIter *parent, co
|
||||
|
||||
glob_pattern = SDL_calloc(sizeof(char), max_len);
|
||||
if (!glob_pattern) {
|
||||
SDL_OutOfMemory();
|
||||
goto cleanup;
|
||||
}
|
||||
glob_pattern[0] = '*';
|
||||
@@ -222,7 +220,6 @@ static DBusHandlerResult DBus_MessageFilter(DBusConnection *conn, DBusMessage *m
|
||||
|
||||
path = SDL_malloc(sizeof(const char *) * length);
|
||||
if (!path) {
|
||||
SDL_OutOfMemory();
|
||||
signal_data->callback(signal_data->userdata, NULL, -1);
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -233,7 +230,6 @@ static DBusHandlerResult DBus_MessageFilter(DBusConnection *conn, DBusMessage *m
|
||||
++length;
|
||||
path = SDL_realloc(path, sizeof(const char *) * length);
|
||||
if (!path) {
|
||||
SDL_OutOfMemory();
|
||||
signal_data->callback(signal_data->userdata, NULL, -1);
|
||||
goto cleanup;
|
||||
}
|
||||
|
Reference in New Issue
Block a user