// Lookup network
int err = loc_database_lookup_from_string(db, address, &network);
if (err) {
- croak("Error fetching a network from the database\n");
+ goto END;
}
// Extract the country code if we have found a network
loc_network_unref(network);
}
+
+ END:
OUTPUT:
RETVAL
// Lookup network
int err = loc_database_lookup_from_string(db, address, &network);
if (err) {
- croak("Error fetching a network from the database\n");
+ goto END;
}
// Check if the network has the given flag
loc_network_unref(network);
}
+ END:
OUTPUT:
RETVAL
// Lookup network
int err = loc_database_lookup_from_string(db, address, &network);
if (err) {
- croak("Error fetching a network from the database\n");
+ goto END;
}
// Extract the ASN
loc_network_unref(network);
}
+
+ END:
OUTPUT:
RETVAL