Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* Cleaned up unneeded macro.

* Minor memleak fix.
* Cosmetics.
  • Loading branch information...
commit 984bb686380fc1abb7f7302d1c7d661eccda297b 1 parent 668058e
@bobbens bobbens authored
Showing with 10 additions and 11 deletions.
  1. +10 −11 src/start.c
View
21 src/start.c
@@ -101,7 +101,7 @@ int start_load (void)
xmlr_strd( cur, "event", start_data.event );
if (xml_isNode(cur,"ship")) {
- xmlr_attr(cur, "name", start_data.shipname);
+ xmlr_attr( cur, "name", start_data.shipname);
xmlr_strd( cur, "ship", start_data.ship );
}
else if (xml_isNode(cur,"system")) {
@@ -189,23 +189,22 @@ int start_load (void)
}
-#define MEMFREE(x) if ((x) != NULL) free(x)
/**
* @brief Cleans up after the module start data.
*/
void start_cleanup (void)
{
- MEMFREE( start_data.name );
- MEMFREE( start_data.ship );
- MEMFREE( start_data.system );
- MEMFREE( start_data.mission );
- MEMFREE( start_data.event );
- MEMFREE( start_data.tutsys );
- MEMFREE( start_data.tutmisn );
- MEMFREE( start_data.tutevt );
+ free( start_data.name );
+ free( start_data.shipname );
+ free( start_data.ship );
+ free( start_data.system );
+ free( start_data.mission );
+ free( start_data.event );
+ free( start_data.tutsys );
+ free( start_data.tutmisn );
+ free( start_data.tutevt );
memset( &start_data, 0, sizeof(start_data) );
}
-#undef MEMFREE
/**
Please sign in to comment.
Something went wrong with that request. Please try again.