fix stuff reported by static analyzer

This commit is contained in:
Sebastian Krzyszkowiak 2017-08-16 01:47:07 +02:00
parent d21a0b799d
commit 417d34ef1a
3 changed files with 2 additions and 2 deletions

View file

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

View file

@ -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)) {

View file

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