Fixed some codacy stuff
This commit is contained in:
parent
4bbe82a705
commit
025bd3eda2
|
@ -70,7 +70,7 @@ ht_set(Hashtable *table, const char *key, void *val)
|
|||
{
|
||||
int hashkey = 0;
|
||||
Entry *newEntry = NULL;
|
||||
Entry *next = NULL;
|
||||
Entry *next;
|
||||
Entry *last = NULL;
|
||||
|
||||
hashkey = hash(table, key);
|
||||
|
@ -86,6 +86,9 @@ ht_set(Hashtable *table, const char *key, void *val)
|
|||
next = next->next;
|
||||
}
|
||||
|
||||
if (last == NULL)
|
||||
last = table->entries[hashkey];
|
||||
|
||||
if (next && next->key && strcmp(key, next->key) == 0) {
|
||||
/* Collision */
|
||||
free(next->value);
|
||||
|
|
|
@ -217,7 +217,7 @@ player_print(Player *p)
|
|||
printf("\n");
|
||||
printf("--------=== <[ Player Stats ]> ===--------\n");
|
||||
printf("HP: %d\n", p->stats.hp);
|
||||
printf("Level: %d XP: %u\n", p->stats.lvl, p->xp);
|
||||
printf("Level: %u XP: %u\n", p->stats.lvl, p->xp);
|
||||
printf("Pos: %dx%d RoomPos: %dx%d\n", pos.x, pos.y, roomPos.x, roomPos.y);
|
||||
printf("Steps: %u\n", p->total_steps);
|
||||
printf("------------------------------------------\n");
|
||||
|
|
Loading…
Reference in New Issue