From 34a4071e998f327945993ea6e6cbcaa0292b4093 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Thu, 2 Apr 2015 13:43:18 +0200 Subject: bootchart: clean up control flow logic Don't blindly exit() from random functions, but return a proper error and upchain error conditions. squash! bootchart: clean up control flow logic When pread() returns "0", it's a read failure, so don't make the caller think log_sample() was successful, return meaningful error code instead of 0. --- src/bootchart/store.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bootchart/store.h') diff --git a/src/bootchart/store.h b/src/bootchart/store.h index f211b6f53b..8cb319275c 100644 --- a/src/bootchart/store.h +++ b/src/bootchart/store.h @@ -32,4 +32,4 @@ extern int procfd; double gettime_ns(void); void log_uptime(void); -void log_sample(int sample, struct list_sample_data **ptr); +int log_sample(int sample, struct list_sample_data **ptr); -- cgit v1.2.3-54-g00ecf