@@ -2144,9 +2144,9 @@ int cg_create_everywhere(CGroupMask supported, CGroupMask mask, const char *path
21442144
21452145 n = cgroup_controller_to_string (c );
21462146
2147- if (mask & bit )
2147+ if (FLAGS_SET ( mask , bit ) )
21482148 (void ) cg_create (n , path );
2149- else if (supported & bit )
2149+ else if (FLAGS_SET ( supported , bit ) )
21502150 (void ) cg_trim (n , path , true);
21512151 }
21522152
@@ -2174,7 +2174,7 @@ int cg_attach_everywhere(CGroupMask supported, const char *path, pid_t pid, cg_m
21742174 if (!FLAGS_SET (CGROUP_MASK_V1 , bit ))
21752175 continue ;
21762176
2177- if (!(supported & bit ))
2177+ if (!FLAGS_SET (supported , bit ))
21782178 continue ;
21792179
21802180 if (path_callback )
@@ -2229,7 +2229,7 @@ int cg_migrate_everywhere(CGroupMask supported, const char *from, const char *to
22292229 if (!FLAGS_SET (CGROUP_MASK_V1 , bit ))
22302230 continue ;
22312231
2232- if (!(supported & bit ))
2232+ if (!FLAGS_SET (supported , bit ))
22332233 continue ;
22342234
22352235 if (to_callback )
@@ -2264,7 +2264,7 @@ int cg_trim_everywhere(CGroupMask supported, const char *path, bool delete_root)
22642264 if (!FLAGS_SET (CGROUP_MASK_V1 , bit ))
22652265 continue ;
22662266
2267- if (!(supported & bit ))
2267+ if (!FLAGS_SET (supported , bit ))
22682268 continue ;
22692269
22702270 (void ) cg_trim (cgroup_controller_to_string (c ), path , delete_root );
@@ -2290,7 +2290,7 @@ int cg_mask_to_string(CGroupMask mask, char **ret) {
22902290 const char * k ;
22912291 size_t l ;
22922292
2293- if (!(mask & CGROUP_CONTROLLER_TO_MASK (c )))
2293+ if (!FLAGS_SET (mask , CGROUP_CONTROLLER_TO_MASK (c )))
22942294 continue ;
22952295
22962296 k = cgroup_controller_to_string (c );
@@ -2603,14 +2603,14 @@ int cg_enable_everywhere(CGroupMask supported, CGroupMask mask, const char *p) {
26032603 if (!FLAGS_SET (CGROUP_MASK_V2 , bit ))
26042604 continue ;
26052605
2606- if (!(supported & bit ))
2606+ if (!FLAGS_SET (supported , bit ))
26072607 continue ;
26082608
26092609 n = cgroup_controller_to_string (c );
26102610 {
26112611 char s [1 + strlen (n ) + 1 ];
26122612
2613- s [0 ] = mask & bit ? '+' : '-' ;
2613+ s [0 ] = FLAGS_SET ( mask , bit ) ? '+' : '-' ;
26142614 strcpy (s + 1 , n );
26152615
26162616 if (!f ) {
0 commit comments