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:
Ozkan Sezer
2024-05-08 19:33:04 +03:00
committed by Ozkan Sezer
parent 7abc589438
commit e909c0360f
15 changed files with 21 additions and 57 deletions

View File

@@ -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;
}