mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-03-20 18:17:12 +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);
|
PrintConsole(game, "Destroying character %s...", character->name);
|
||||||
if (!character->shared) {
|
if (!character->shared) {
|
||||||
struct Spritesheet *tmp, *s = character->spritesheets;
|
struct Spritesheet *tmp, *s = character->spritesheets;
|
||||||
tmp = s;
|
|
||||||
while (s) {
|
while (s) {
|
||||||
tmp = s;
|
tmp = s;
|
||||||
s = s->next;
|
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) {
|
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;
|
void* d = NULL;
|
||||||
while (tmp) {
|
while (tmp) {
|
||||||
if (identity(tmp, data)) {
|
if (identity(tmp, data)) {
|
||||||
|
|
|
@ -57,6 +57,7 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char*
|
||||||
|
|
||||||
if(!al_init()) {
|
if(!al_init()) {
|
||||||
fprintf(stderr, "failed to initialize allegro!\n");
|
fprintf(stderr, "failed to initialize allegro!\n");
|
||||||
|
free(game);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue