config_name must be provided and case in which it is empty or is NULL is
a programmer error
Change-Id: I21274c8331edd118d672802f06f7bec7ac8ddde8
#include <iostream>
#include <string>
+#include <cassert>
#include <dbuspolicy1/libdbuspolicy1.h>
#include "xml_parser.hpp"
#include "policy.hpp"
using namespace ldp_xml_parser;
-static const char* get_str(const char* const szstr) {
- return (szstr != NULL) ? szstr : "";
-}
-
int __internal_init_serialized(BusType bus_type, const char *config_name, const char *serialized_filename)
{
- auto ok = policy_checker(bus_type).initDb(get_str(config_name), serialized_filename);
+ assert(config_name);
+ assert(config_name[0]);
+
+ auto ok = policy_checker(bus_type).initDb(config_name, serialized_filename);
if (tslog::enabled())
memory_dump(bus_type);
return ok ? 0 : -1;