afb-hook-flags: Fix a compilation warning
[src/app-framework-binder.git] / src / afb-hook-flags.c
index 738e54c..02ea3c8 100644 (file)
@@ -112,6 +112,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 +216,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 +229,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;