commit | 3fbe89ad2113d19005e2e544ec65f63cf7e477ea | [log] [tgz] |
---|---|---|
author | Radek Krejci <rkrejci@cesnet.cz> | Thu Sep 20 13:54:46 2018 +0200 |
committer | Radek Krejci <rkrejci@cesnet.cz> | Thu Sep 20 13:54:46 2018 +0200 |
tree | 92c3b3a4a2065574b55c35a4b5d23922543fe947 | |
parent | 0759b793cb76f6a19b2dc16e0b195a8ab71420c2 [diff] [blame] |
context BUGFIX check input parameters in public functions
diff --git a/src/context.c b/src/context.c index d790c87..97fff0b 100644 --- a/src/context.c +++ b/src/context.c
@@ -298,14 +298,16 @@ } API int -ly_ctx_get_options(struct ly_ctx *ctx) +ly_ctx_get_options(const struct ly_ctx *ctx) { + LY_CHECK_ARG_RET(ctx, ctx, 0); return ctx->flags; } API uint16_t ly_ctx_get_module_set_id(const struct ly_ctx *ctx) { + LY_CHECK_ARG_RET(ctx, ctx, 0); return ctx->module_set_id; }