X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-hook-flags.c;h=9a7cf6e952c0d78f65973cf2184ecb8a49564961;hb=0d3dc9722c610857c2f83c4f3bf06299f2426a95;hp=5798735603197a74f9beb29a732c3b1931b5aaf4;hpb=5ef271effacb83552f9ea56572c751c2f5a556b6;p=src%2Fapp-framework-binder.git diff --git a/src/afb-hook-flags.c b/src/afb-hook-flags.c index 57987356..9a7cf6e9 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 @@ -138,7 +140,6 @@ static struct flag session_flags[] = { /* must be sorted by names */ { "common", afb_hook_flags_session_common }, { "create", afb_hook_flag_session_create }, { "destroy", afb_hook_flag_session_destroy }, - { "renew", afb_hook_flag_session_renew }, { "unref", afb_hook_flag_session_unref }, }; @@ -216,7 +217,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"); @@ -229,7 +230,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; @@ -358,3 +359,4 @@ char *afb_hook_flags_legacy_svc_to_text(int value) } #endif +#endif /* WITH_AFB_HOOK *******************************************************/