// Try adding an invalid network
struct loc_network* network;
err = loc_writer_add_network(writer, &network, "xxxx:xxxx::/32");
- if (err != -EINVAL) {
+ if (!err) {
fprintf(stderr, "It was possible to add an invalid network (err = %d)\n", err);
exit(EXIT_FAILURE);
}
FILE* f = tmpfile();
if (!f) {
- fprintf(stderr, "Could not open file for writing: %s\n", strerror(errno));
+ fprintf(stderr, "Could not open file for writing: %m\n");
exit(EXIT_FAILURE);
}