X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-hook-flags.c;h=874d21b6682c59f67cc9b0f7093288121eb27ebe;hb=a2cf84ecde926adeebf09bc2c284401513d3fab3;hp=738e54ce3ecbdbae78c781adc9fcb5ab9525661d;hpb=f96bbb49cc9bcd81693300191cf7a01b879fd83d;p=src%2Fapp-framework-binder.git diff --git a/src/afb-hook-flags.c b/src/afb-hook-flags.c index 738e54ce..874d21b6 100644 --- a/src/afb-hook-flags.c +++ b/src/afb-hook-flags.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 "IoT.bzh" + * Copyright (C) 2018, 2019 "IoT.bzh" * Author José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,6 +15,8 @@ * limitations under the License. */ +#if WITH_AFB_HOOK /***********************************************************/ + #define _GNU_SOURCE #include @@ -112,6 +114,7 @@ static struct flag api_flags[] = { /* must be sorted by names */ { "require_api", afb_hook_flag_api_require_api }, { "rootdir_get_fd", afb_hook_flag_api_rootdir_get_fd }, { "rootdir_open_locale",afb_hook_flag_api_rootdir_open_locale }, + { "settings", afb_hook_flag_api_settings }, { "start", afb_hook_flag_api_start }, { "vverbose", afb_hook_flag_api_vverbose }, }; @@ -215,7 +218,7 @@ static char *to_text(int value, struct flags flags) { int borrow = 0, mask = 0, i, v, imask; size_t s = 0; - char *result; + char *result = NULL; if (!value) return strdup("none"); @@ -228,7 +231,7 @@ static char *to_text(int value, struct flags flags) } borrow = 0; while (borrow != value) { - mask = 0; + mask = imask = 0; i = flags.count; while (i) { v = flags.flags[--i].value; @@ -357,3 +360,4 @@ char *afb_hook_flags_legacy_svc_to_text(int value) } #endif +#endif /* WITH_AFB_HOOK *******************************************************/