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)
494494 int ret;
495495 if ((ret = cgroup_get_cgroup (cg)) != 0 ) error (ret," get cgroup information" );
496496
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" );
500499 ret = cgroup_get_value_int64 (cg_controller, " memory.memsw.max_usage_in_bytes" , &max_usage);
501500 if ( ret!=0 ) error (ret," get cgroup value memory.memsw.max_usage_in_bytes" );
502501
@@ -516,7 +515,7 @@ void output_cgroup_stats_v1(double *cputime)
516515void output_cgroup_stats_v2 (double *cputime)
517516{
518517 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" );
520519
521520 int ret;
522521 if ((ret = cgroup_get_cgroup (cg)) != 0 ) error (ret," get cgroup information" );
@@ -549,7 +548,6 @@ void output_cgroup_stats_v2(double *cputime)
549548 cgroup_read_stats_end (&handle);
550549
551550 cgroup_free (&cg);
552-
553551}
554552
555553/* Temporary shorthand define for error handling. */
You can’t perform that action at this time.
0 commit comments