From 039958632036808f9baa207e72b9827fa97b7a10 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Thu, 2 Apr 2015 13:24:30 +0200 Subject: bootchart: switch to log_* helpers Let the helper functions take care of the string message output. --- src/bootchart/store.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/bootchart/store.c') diff --git a/src/bootchart/store.c b/src/bootchart/store.c index fb3dc9ad6e..0663e100e8 100644 --- a/src/bootchart/store.c +++ b/src/bootchart/store.c @@ -143,10 +143,8 @@ void log_sample(int sample, struct list_sample_data **ptr) { if (vmstat < 0) { /* block stuff */ vmstat = openat(procfd, "vmstat", O_RDONLY); - if (vmstat == -1) { - log_error_errno(errno, "Failed to open /proc/vmstat: %m"); - exit(EXIT_FAILURE); - } + if (vmstat == -1) + return log_error_errno(errno, "Failed to open /proc/vmstat: %m"); } n = pread(vmstat, buf, sizeof(buf) - 1, 0); -- cgit v1.2.3-54-g00ecf