Fix the following clang warnings by initializing the char pointers to
NULL rather than '\0';
api.c:4232:46: warning: expression which evaluates to zero treated as a
null pointer constant of type 'char *' [-Wnon-literal-null-conversion]
4232 | char *controller_list[MAX_MNT_ELEMENTS] = { '\0' };
| ^~~~
api.c:4233:40: warning: expression which evaluates to zero treated as a
null pointer constant of type 'char *' [-Wnon-literal-null-conversion]
4233 | char *cgrp_list[MAX_MNT_ELEMENTS] = { '\0' };
| ^~~~
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
STATIC bool cgroup_compare_ignore_rule(const struct cgroup_rule * const rule, pid_t pid,
const char * const procname)
{
- char *controller_list[MAX_MNT_ELEMENTS] = { '\0' };
- char *cgrp_list[MAX_MNT_ELEMENTS] = { '\0' };
+ char *controller_list[MAX_MNT_ELEMENTS] = { NULL };
+ char *cgrp_list[MAX_MNT_ELEMENTS] = { NULL };
int rule_matching_controller_idx;
int cgrp_list_matching_idx = 0;
bool found_match = false;