mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-07 21:56:44 +01:00
fix stuff reported by static analyzer
This commit is contained in:
parent
d21a0b799d
commit
417d34ef1a
3 changed files with 2 additions and 2 deletions
|
@ -154,7 +154,6 @@ SYMBOL_EXPORT void DestroyCharacter(struct Game *game, struct Character *charact
|
|||
PrintConsole(game, "Destroying character %s...", character->name);
|
||||
if (!character->shared) {
|
||||
struct Spritesheet *tmp, *s = character->spritesheets;
|
||||
tmp = s;
|
||||
while (s) {
|
||||
tmp = s;
|
||||
s = s->next;
|
||||
|
|
|
@ -171,7 +171,7 @@ SYMBOL_INTERNAL struct libsuperderpy_list* AddToList(struct libsuperderpy_list *
|
|||
}
|
||||
|
||||
SYMBOL_INTERNAL struct libsuperderpy_list* RemoveFromList(struct libsuperderpy_list **list, bool (*identity)(struct libsuperderpy_list* elem, void* data), void* data) {
|
||||
struct libsuperderpy_list *prev = NULL, *tmp = *list, *start = *list;
|
||||
struct libsuperderpy_list *prev = NULL, *tmp = *list, *start;
|
||||
void* d = NULL;
|
||||
while (tmp) {
|
||||
if (identity(tmp, data)) {
|
||||
|
|
|
@ -57,6 +57,7 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char*
|
|||
|
||||
if(!al_init()) {
|
||||
fprintf(stderr, "failed to initialize allegro!\n");
|
||||
free(game);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue