File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -494,9 +494,8 @@ void output_cgroup_stats_v1(double *cputime)
494
494
int ret;
495
495
if ((ret = cgroup_get_cgroup (cg)) != 0 ) error (ret," get cgroup information" );
496
496
497
- int64_t max_usage;
498
- struct cgroup_controller *cg_controller;
499
- cg_controller = cgroup_get_controller (cg, " memory" );
497
+ int64_t max_usage = 0 ;
498
+ struct cgroup_controller *cg_controller = cgroup_get_controller (cg, " memory" );
500
499
ret = cgroup_get_value_int64 (cg_controller, " memory.memsw.max_usage_in_bytes" , &max_usage);
501
500
if ( ret!=0 ) error (ret," get cgroup value memory.memsw.max_usage_in_bytes" );
502
501
@@ -516,7 +515,7 @@ void output_cgroup_stats_v1(double *cputime)
516
515
void output_cgroup_stats_v2 (double *cputime)
517
516
{
518
517
struct cgroup *cg;
519
- if ( (cg = cgroup_new_cgroup (cgroupname))==NULL ) error (0 ," cgroup_new_cgroup" );
518
+ if ( (cg = cgroup_new_cgroup (cgroupname))==nullptr ) error (0 ," cgroup_new_cgroup" );
520
519
521
520
int ret;
522
521
if ((ret = cgroup_get_cgroup (cg)) != 0 ) error (ret," get cgroup information" );
@@ -549,7 +548,6 @@ void output_cgroup_stats_v2(double *cputime)
549
548
cgroup_read_stats_end (&handle);
550
549
551
550
cgroup_free (&cg);
552
-
553
551
}
554
552
555
553
/* Temporary shorthand define for error handling. */
You can’t perform that action at this time.
0 commit comments