diff options
author | Tomas Krizek <tomas.krizek@nic.cz> | 2021-03-24 17:44:46 +0100 |
---|---|---|
committer | Tomas Krizek <tomas.krizek@nic.cz> | 2021-05-25 14:39:42 +0200 |
commit | 2c22c46239f6cc3e0e733d6374b1fc6698bffb70 (patch) | |
tree | 008985709138f6318176474b40b3d4b03bf38040 /lib/module.c | |
parent | lib/layer/validate.c: replace asserts (diff) | |
download | knot-resolver-2c22c46239f6cc3e0e733d6374b1fc6698bffb70.tar.xz knot-resolver-2c22c46239f6cc3e0e733d6374b1fc6698bffb70.zip |
lib/module.c: replace asserts
Diffstat (limited to 'lib/module.c')
-rw-r--r-- | lib/module.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/module.c b/lib/module.c index 2174f90e..577ed959 100644 --- a/lib/module.c +++ b/lib/module.c @@ -36,7 +36,8 @@ static void *load_symbol(void *lib, const char *prefix, const char *name) static int load_library(struct kr_module *module, const char *name, const char *path) { - assert(module && name && path); + if (!kr_assume(module && name && path)) + return kr_error(EINVAL); /* Absolute or relative path (then only library search path is used). */ auto_free char *lib_path = kr_strcatdup(4, path, "/", name, LIBEXT); if (lib_path == NULL) { |