forked from github/server
fix gcc build, ebable new test.
This commit is contained in:
parent
9848ba08d0
commit
6e24fe9be2
|
@ -12,13 +12,11 @@ ally * ally_find(ally *al, const struct faction *f) {
|
|||
|
||||
ally * ally_add(ally **al_p, struct faction *f) {
|
||||
ally * al;
|
||||
if (f) {
|
||||
while (*al_p) {
|
||||
al = *al_p;
|
||||
if (al->faction == f) return al;
|
||||
if (f && al->faction == f) return al;
|
||||
al_p = &al->next;
|
||||
}
|
||||
}
|
||||
al = (ally *)malloc(sizeof(ally));
|
||||
al->faction = f;
|
||||
al->status = 0;
|
||||
|
|
|
@ -37,6 +37,7 @@ CuSuite *get_ally_suite(void)
|
|||
{
|
||||
CuSuite *suite = CuSuiteNew();
|
||||
SUITE_ADD_TEST(suite, test_ally);
|
||||
SUITE_ADD_TEST(suite, test_ally_null);
|
||||
return suite;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue