#include "src/surf/network_interface.hpp"
#include "src/instr/instr_private.h" // TRACE_start(). FIXME: remove by subscribing tracing to the surf signals
-#include "src/surf/xml/platf.hpp"
+#include "src/surf/xml/platf_private.hpp"
#if HAVE_LUA
extern "C" {
/* Register classical callbacks */
storage_register_callbacks();
- routing_register_callbacks();
after_config_done = 1;
}
void parse_platform_file(const char *file)
{
#if HAVE_LUA
- int is_lua = (file != nullptr && strlen(file) > 3 && file[strlen(file)-3] == 'l' && file[strlen(file)-2] == 'u'
- && file[strlen(file)-1] == 'a');
+ int len = (file == nullptr ? 0 : strlen(file));
+ int is_lua = (file != nullptr && len > 3 && file[len - 3] == 'l' && file[len - 2] == 'u' && file[len - 1] == 'a');
#endif
sg_platf_init();